From 6965bd89216a8d759ff8ea35ca4d1e88b0c35906 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Mon, 25 Feb 2008 00:24:03 -0500 Subject: Rework the basic infrastructure for qrunner process control. Split out the functionality of mailmanctl into a separate master watcher script. mailmanctl has not yet been updated but that'll happen next. Fix DELIVERY_MODULE to name a handler instead of a module. Change make_instance to use pkg_resources instead of module.__file__. Change the qrunner and master processes coordination so that the qrunners are not restarted on SIGINT, because otherwise C-c just doesn't work. Now SIGUSR1 is how we'll implement 'mailman restart'. Add a database commit so that initializing the schema doesn't lock the sqlite database. Also, don't try to initialize the schema if the tables already exist. Use some sqlite magic to do this test. Move mailman.cfg.in into a new package Mailman/extras inside the tree. Also, MAILMAN_UID and MAILMAN_GID should be integers not strings. Convert the command runner to use an IHandler instance instead of handler module. Similarly for the outgoing runner, DELIVERY_MODULE now names an IHandler instance instead of a handler module. --- Mailman/queue/command.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Mailman/queue/command.py') diff --git a/Mailman/queue/command.py b/Mailman/queue/command.py index 8217acad6..a0db2f776 100644 --- a/Mailman/queue/command.py +++ b/Mailman/queue/command.py @@ -33,7 +33,6 @@ from email.MIMEText import MIMEText from Mailman import Message from Mailman import Utils -from Mailman.Handlers import Replybot from Mailman.app.replybot import autorespond_to_sender from Mailman.configuration import config from Mailman.i18n import _ @@ -206,7 +205,8 @@ class CommandRunner(Runner): return False # Do replybot for commands mlist.Load() - Replybot.process(mlist, msg, msgdata) + replybot = config.handlers['replybot'] + replybot.process(mlist, msg, msgdata) if mlist.autorespond_requests == 1: log.info('replied and discard') # w/discard -- cgit v1.2.3-70-g09d2