summaryrefslogtreecommitdiff
path: root/Mailman/bin/request.py
diff options
context:
space:
mode:
authorBarry Warsaw2007-09-29 14:55:25 -0400
committerBarry Warsaw2007-09-29 14:55:25 -0400
commit3e9ed398b6a05c69daca14c8226ca7f57c164c21 (patch)
treeb0ae2e9771a80f9e0e6218871bbe2d281120202c /Mailman/bin/request.py
parentcbf2967239163e42cc2b25eece7bb5cb71b197fe (diff)
downloadmailman-3e9ed398b6a05c69daca14c8226ca7f57c164c21.tar.gz
mailman-3e9ed398b6a05c69daca14c8226ca7f57c164c21.tar.zst
mailman-3e9ed398b6a05c69daca14c8226ca7f57c164c21.zip
Reorganize the qrunner infrastructure. First, the package has been renamed
from Mailman.Queue to Mailman.queue (note the case change to be more PEP 8 compliant). The Switchboard and Runner classes have been moved into the package __init__.py and the previous class modules have been removed. The switchboard cache is removed; I don't think it was ultimately buying us much. Now, just import the Switchboard class and instantiate it directly. Added an IRunner interface. Renamed the ArchRunner to ArchiveRunner. bin/qrunner and bin/mailmanctl are updated accordingly. For the former, it no long accepts -r=All to run all qrunners. You can still use the short name (e.g. --runner=incoming) to run the built-in queue runners, but this design will eventually allow for plugin qrunners by allowing them to be run specifying the full package path to the class. It also now accepts a leading dot to indicate a qrunner class relative to the Mailman.queue package.
Diffstat (limited to 'Mailman/bin/request.py')
-rw-r--r--Mailman/bin/request.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Mailman/bin/request.py b/Mailman/bin/request.py
index 9bdb1f3c0..6ced2a871 100644
--- a/Mailman/bin/request.py
+++ b/Mailman/bin/request.py
@@ -28,9 +28,9 @@ import logging
from Mailman import Utils
from Mailman import loginit
-from Mailman.Queue.sbcache import get_switchboard
from Mailman.configuration import config
from Mailman.i18n import _
+from Mailman.queue import Switchboard
__i18n_templates__ = True
@@ -55,7 +55,7 @@ def main():
# some MTAs have a hard limit to the time a filter prog can run. Postfix
# is a good example; if the limit is hit, the proc is SIGKILL'd giving us
# no chance to save the message.
- cmdq = get_switchboard(config.CMDQUEUE_DIR)
+ cmdq = Switchboard(config.CMDQUEUE_DIR)
cmdq.enqueue(sys.stdin.read(),
listname=listname,
torequest=True,