summaryrefslogtreecommitdiff
path: root/Mailman/Queue
diff options
context:
space:
mode:
authorbwarsaw2007-01-05 20:57:51 +0000
committerbwarsaw2007-01-05 20:57:51 +0000
commit39fa9eaabcd19919fed0a901d7f3cbc33527d938 (patch)
tree34fcd7e60cb1b7cd9d196615939e6715b575a45c /Mailman/Queue
parent9af2533eb89e48683c049c5007737f7e94bbcdc1 (diff)
downloadmailman-39fa9eaabcd19919fed0a901d7f3cbc33527d938.tar.gz
mailman-39fa9eaabcd19919fed0a901d7f3cbc33527d938.tar.zst
mailman-39fa9eaabcd19919fed0a901d7f3cbc33527d938.zip
In HTTPRunner, when we see a KeyboardInterrupt during the serve_forever(),
don't re-raise the exception since that will show up in the log files. Instead just exit with a code equal to SIGTERM. Rework the way qrunners are specified in the mailman.cfg file. Always start the default number of the default set of qrunners, but allow mailman.cfg to delete some with the del_qrunner() function. Rename add_runner() to add_qrunner() and make this actually work <wink>. Both take the shortened qrunner name as the first argument (e.g. 'Arch' instead of 'ArchRunner'). Automatically start the MaildirRunner if USE_MAILDIR = Yes; same goes for LMTPRunner and USE_LMTP = Yes. In both cases, you do not need to also use add_qrunner() in your mailman.cfg file to enable them. You still do need to put "add_qrunner('HTTP')" in your mailman.cfg if you want to enable the wsgi server. This may end up being added to the default set.
Diffstat (limited to 'Mailman/Queue')
-rw-r--r--Mailman/Queue/HTTPRunner.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/Mailman/Queue/HTTPRunner.py b/Mailman/Queue/HTTPRunner.py
index 1858cff58..b4de67fd7 100644
--- a/Mailman/Queue/HTTPRunner.py
+++ b/Mailman/Queue/HTTPRunner.py
@@ -64,8 +64,9 @@ qlog.info('HTTPRunner qrunner started.')
hlog.info('HTTPRunner listening on %s:%s', config.HTTP_HOST, config.HTTP_PORT)
try:
server.serve_forever()
-# Do it this way because of exception hierarchy changes in Python 2.5. XXX
-# Change this to BaseException for Python 2.5.
-except (Exception, KeyboardInterrupt):
+except KeyboardInterrupt:
+ qlog.exception('HTTPRunner qrunner exiting.')
+ sys.exit(signal.SIGTERM)
+except:
qlog.exception('HTTPRunner qrunner exiting.')
raise