diff options
| author | bwarsaw | 2003-02-05 05:45:26 +0000 |
|---|---|---|
| committer | bwarsaw | 2003-02-05 05:45:26 +0000 |
| commit | 22e7c66439b577d84379fe6c8c290f74996b3c7a (patch) | |
| tree | 49fcbc2b555b062a0f978a9699d5bc8c44c0b5fb /Mailman/Queue/IncomingRunner.py | |
| parent | 2532e29919bcc1bda962b91d6403ac2cb0a2d35a (diff) | |
| download | mailman-22e7c66439b577d84379fe6c8c290f74996b3c7a.tar.gz mailman-22e7c66439b577d84379fe6c8c290f74996b3c7a.tar.zst mailman-22e7c66439b577d84379fe6c8c290f74996b3c7a.zip | |
Restore the resumable pipeline code.
_dispose(): Set the msgdata's pipeline attribute to the pipeline list
before calling _dopipeline(). If there's no more to do, delete this
attribute. This way, if one of the modules throws an exception, we'll
resume the next delivery attempt at that module. (E.g. if we unshunt
it later).
_dopipeline(): Add a bare except which pushes the failing module back
on the front of the pipeline list, then re-raises the exception.
Diffstat (limited to 'Mailman/Queue/IncomingRunner.py')
| -rw-r--r-- | Mailman/Queue/IncomingRunner.py | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/Mailman/Queue/IncomingRunner.py b/Mailman/Queue/IncomingRunner.py index 4a60ceb9a..e85cc764c 100644 --- a/Mailman/Queue/IncomingRunner.py +++ b/Mailman/Queue/IncomingRunner.py @@ -1,4 +1,4 @@ -# Copyright (C) 1998,1999,2000,2001,2002 by the Free Software Foundation, Inc. +# Copyright (C) 1998-2003 by the Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -126,11 +126,12 @@ class IncomingRunner(Runner): # used. Final fallback is the global pipeline. try: pipeline = self._get_pipeline(mlist, msg, msgdata) - status = self._dopipeline(mlist, msg, msgdata, pipeline) - if status: - msgdata['pipeline'] = pipeline + msgdata['pipeline'] = pipeline + more = self._dopipeline(mlist, msg, msgdata, pipeline) + if not more: + del msgdata['pipeline'] mlist.Save() - return status + return more finally: mlist.Unlock() @@ -166,5 +167,10 @@ class IncomingRunner(Runner): except Errors.RejectMessage, e: mlist.BounceMessage(msg, msgdata, e) return 0 + except: + # Push this pipeline module back on the stack, then re-raise + # the exception. + pipeline.insert(0, handler) + raise # We've successfully completed handling of this message return 0 |
