diff options
| author | bwarsaw | 2002-02-12 04:48:24 +0000 |
|---|---|---|
| committer | bwarsaw | 2002-02-12 04:48:24 +0000 |
| commit | 807f60eac68c01a8c3177919ae109f93dc98759e (patch) | |
| tree | dcafc270e8ee587dcc359009a03d86f18ec9c2d8 /Mailman/Queue/Runner.py | |
| parent | f5b21ea7b94b1c291771e68425b274874096ae3e (diff) | |
| download | mailman-807f60eac68c01a8c3177919ae109f93dc98759e.tar.gz mailman-807f60eac68c01a8c3177919ae109f93dc98759e.tar.zst mailman-807f60eac68c01a8c3177919ae109f93dc98759e.zip | |
Diffstat (limited to 'Mailman/Queue/Runner.py')
| -rw-r--r-- | Mailman/Queue/Runner.py | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/Mailman/Queue/Runner.py b/Mailman/Queue/Runner.py index ac79e7f1b..f569911c7 100644 --- a/Mailman/Queue/Runner.py +++ b/Mailman/Queue/Runner.py @@ -1,4 +1,4 @@ -# Copyright (C) 1998,1999,2000,2001 by the Free Software Foundation, Inc. +# Copyright (C) 1998,1999,2000,2001,2002 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 @@ -44,6 +44,11 @@ class Runner: # Create the shunt switchboard self._shunt = Switchboard(mm_cfg.SHUNTQUEUE_DIR) self._stop = 0 + # Used by _open_list() to decide whether to freshen the state of any + # MailList object retrieved from the cache. Most runners will + # eventually lock their lists, which automatically reloads their + # state. It's only non-locking runners that need to set this. + self._freshen = 0 def stop(self): self._stop = 1 @@ -171,7 +176,13 @@ class Runner: mlist = self._listcache.get(listname) else: mlist = None - if not mlist: + if mlist: + # Non-locking runners should set this to true so that they'll be + # sure they get fresh state. Locking runners don't need to do + # this because the state is reloaded after locking the list. + if self._freshen: + mlist.Load() + else: try: mlist = MailList.MailList(listname, lock=0) if self._cachelists: |
