summaryrefslogtreecommitdiff
path: root/fml/lib/FML/Process/Error.pm
diff options
context:
space:
mode:
authorfukachan <fukachan>2002-08-07 04:00:39 +0000
committerfukachan <fukachan>2002-08-07 04:00:39 +0000
commit08d6fc3e500b3e4f9199781b5e08160c18e66bd3 (patch)
treef408595622945b2980e6b0364fda6d90a6f14a3f /fml/lib/FML/Process/Error.pm
parent65a460ce29e64cd0f54e153de5b500abbcbfac64 (diff)
downloadfml8-08d6fc3e500b3e4f9199781b5e08160c18e66bd3.tar.gz
fml8-08d6fc3e500b3e4f9199781b5e08160c18e66bd3.tar.bz2
fml8-08d6fc3e500b3e4f9199781b5e08160c18e66bd3.zip
create FML::Error:: with separate clesses for cache manipulation and
analyzer. modified to FML::Error::Cache for cache writing.
Diffstat (limited to 'fml/lib/FML/Process/Error.pm')
-rw-r--r--fml/lib/FML/Process/Error.pm40
1 files changed, 21 insertions, 19 deletions
diff --git a/fml/lib/FML/Process/Error.pm b/fml/lib/FML/Process/Error.pm
index 8e7d94ca..70629a3e 100644
--- a/fml/lib/FML/Process/Error.pm
+++ b/fml/lib/FML/Process/Error.pm
@@ -3,7 +3,7 @@
# Copyright (C) 2002 Ken'ichi Fukamachi
# All rights reserved.
#
-# $FML: Error.pm,v 1.13 2002/07/30 04:03:26 fukachan Exp $
+# $FML: Error.pm,v 1.14 2002/08/03 10:35:08 fukachan Exp $
#
package FML::Process::Error;
@@ -145,30 +145,31 @@ sub run
if ($eval) { eval qq{ $eval; }; LogWarn($@) if $@; }
eval q{
- my $bounce_info = [];
-
use Mail::Bounce;
my $bouncer = new Mail::Bounce;
$bouncer->analyze( $msg );
+ use FML::Error::Cache;
+ my $errorcache = new FML::Error::Cache $curproc;
+
for my $address ( $bouncer->address_list ) {
my $status = $bouncer->status( $address );
my $reason = $bouncer->reason( $address );
- Log("bounced: address=<$address>");
- Log("bounced: status=$status");
- Log("bounced: reason=\"$reason\"");
-
- my $hint = {
- address => $address,
- status => $status,
- reason => $reason,
- };
- $bounce_info->[ $found++ ] = $hint;
- }
- use FML::ErrorAnalyze;
- my $error = new FML::ErrorAnalyze $curproc;
- $error->cache_on( $bounce_info );
+ if ($address) {
+ Log("bounced: address=<$address>");
+ Log("bounced: status=$status");
+ Log("bounced: reason=\"$reason\"");
+
+ $errorcache->add({
+ address => $address,
+ status => $status,
+ reason => $reason,
+ });
+
+ $found++;
+ }
+ }
};
LogError($@) if $@;
@@ -226,8 +227,9 @@ sub finish
if ($pcb->get("error", "found")) {
Log("error message found");
- # $curproc->inform_reply_messages();
- # $curproc->queue_flush();
+
+ my $scheduler = $curproc->scheduler();
+
}
else {
Log("error message not found");