diff options
| author | bwarsaw | 2002-03-04 18:45:12 +0000 |
|---|---|---|
| committer | bwarsaw | 2002-03-04 18:45:12 +0000 |
| commit | 4d0bbc2b1b2633d4e4f6597d5577ae71e8e6568a (patch) | |
| tree | 85191434080d18ee7747ccfb7caf859d290f20fb /Mailman/Queue/OutgoingRunner.py | |
| parent | e993329c9b5e7205a638806cacf87d9375308dc3 (diff) | |
| download | mailman-4d0bbc2b1b2633d4e4f6597d5577ae71e8e6568a.tar.gz mailman-4d0bbc2b1b2633d4e4f6597d5577ae71e8e6568a.tar.zst mailman-4d0bbc2b1b2633d4e4f6597d5577ae71e8e6568a.zip | |
Diffstat (limited to 'Mailman/Queue/OutgoingRunner.py')
| -rw-r--r-- | Mailman/Queue/OutgoingRunner.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Mailman/Queue/OutgoingRunner.py b/Mailman/Queue/OutgoingRunner.py index 4bc1afa8b..05b1a4b32 100644 --- a/Mailman/Queue/OutgoingRunner.py +++ b/Mailman/Queue/OutgoingRunner.py @@ -46,18 +46,18 @@ class OutgoingRunner(Runner): # We never lock the lists, but we need to be sure that MailList # objects read from the cache are always fresh. self._freshen = 1 + # We look this function up only at startup time + modname = 'Mailman.Handlers.' + mm_cfg.DELIVERY_MODULE + mod = __import__(modname) + self._func = getattr(sys.modules[modname], 'process') def _dispose(self, mlist, msg, msgdata): # Fortunately, we do not need the list lock to do deliveries. However # this does mean that we aren't as responsive to changes in list # configuration, since we never reload the list configuration. - handler = mm_cfg.DELIVERY_MODULE - modname = 'Mailman.Handlers.' + handler - mod = __import__(modname) - func = getattr(sys.modules[modname], 'process') try: pid = os.getpid() - func(mlist, msg, msgdata) + self._func(mlist, msg, msgdata) # Failsafe -- a child may have leaked through. if pid <> os.getpid(): syslog('error', 'child process leaked thru: %s', modname) |
