summaryrefslogtreecommitdiff
path: root/Mailman/Handlers/ToUsenet.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/Handlers/ToUsenet.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/Handlers/ToUsenet.py')
-rw-r--r--Mailman/Handlers/ToUsenet.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Mailman/Handlers/ToUsenet.py b/Mailman/Handlers/ToUsenet.py
index 63f5da52a..09bb28bdd 100644
--- a/Mailman/Handlers/ToUsenet.py
+++ b/Mailman/Handlers/ToUsenet.py
@@ -20,7 +20,7 @@
import logging
from Mailman.configuration import config
-from Mailman.Queue.sbcache import get_switchboard
+from Mailman.queue import Switchboard
COMMASPACE = ', '
@@ -45,5 +45,5 @@ def process(mlist, msg, msgdata):
COMMASPACE.join(error))
return
# Put the message in the news runner's queue
- newsq = get_switchboard(config.NEWSQUEUE_DIR)
+ newsq = Switchboard(config.NEWSQUEUE_DIR)
newsq.enqueue(msg, msgdata, listname=mlist.fqdn_listname)