From 3e9ed398b6a05c69daca14c8226ca7f57c164c21 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Sat, 29 Sep 2007 14:55:25 -0400 Subject: 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. --- Mailman/bin/request.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Mailman/bin/request.py') 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, -- cgit v1.2.3-70-g09d2