summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfukachan <fukachan>2005-12-19 03:06:32 +0000
committerfukachan <fukachan>2005-12-19 03:06:32 +0000
commit086bd9b2bc698ac8bc953668304ea1fe2870a1b0 (patch)
tree8f6ceb11cb3e5accfb1e5b7b606fa89f0d8e5607
parent91d3d1e7f7da86d4604c8ea8d29930bf1b0c5b12 (diff)
downloadfml8-086bd9b2bc698ac8bc953668304ea1fe2870a1b0.tar.gz
fml8-086bd9b2bc698ac8bc953668304ea1fe2870a1b0.tar.bz2
fml8-086bd9b2bc698ac8bc953668304ea1fe2870a1b0.zip
remove moderation queue if distribution succeded.
-rw-r--r--fml/lib/FML/Moderate.pm25
1 files changed, 18 insertions, 7 deletions
diff --git a/fml/lib/FML/Moderate.pm b/fml/lib/FML/Moderate.pm
index a851660c..2a493999 100644
--- a/fml/lib/FML/Moderate.pm
+++ b/fml/lib/FML/Moderate.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: Moderate.pm,v 1.1 2005/12/18 12:21:15 fukachan Exp $
+# $FML: Moderate.pm,v 1.2 2005/12/18 12:28:49 fukachan Exp $
#
package FML::Moderate;
@@ -186,12 +186,23 @@ sub distribute_article
},
};
- use FML::Process::Switch;
- &FML::Process::Switch::NewProcess($curproc,
- $myname,
- $ml_name,
- $ml_domain,
- $hints);
+ eval q{
+ use FML::Process::Switch;
+ &FML::Process::Switch::NewProcess($curproc,
+ $myname,
+ $ml_name,
+ $ml_domain,
+ $hints);
+ };
+
+ unless ($@) {
+ # remove submitted moderation queue if distribution succeeded.
+ $curproc->incoming_message_stack_queue_for_removal($queue);
+ }
+ else {
+ $curproc->logerror($@);
+ }
+
$curproc->log("emulation done");
};
if ($@) {