summaryrefslogtreecommitdiff
path: root/bin/qrunner (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Remove some obsolete command line scripts:Barry Warsaw2007-07-211-0/+0
| | | | | | | | | | | | | | | | | | | - bin/check_dbs because there are no more pickles - bin/convert because in MM3 everything will use $-strings and we'll do the conversion on import of the old list data - bin/mmshell because setuptools provides its own equivalent - bin/qrunner and bin/mailmanctl because the files were empty There are a bunch of scripts still left in bin/ which will eventually get removed. I'm leaving them for now because they're either helpers generally tangential to Mailman (msgfmt, po2template, pygettext, templ2pot, transcheck), or are using old interfaces that will go away soon (clone_member, convert, discard, fix_url, list_admins, remove_members, reset_pw, sync_members). Also moved bin/cleanarch into Mailman/bin/cleanarch.py and updated it to use optparse. Also added a small patch to genalias to standardize its help printing.
* Massive conversion process so that Mailman can be run from a user specifiedbwarsaw2006-07-081-278/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | configuration file. While the full conversion is not yet complete, everything that seems to be required to run mailmanctl, qrunner, rmlist, and newlist have been updated. Basically, modules should no longer import mm_cfg, but instead they should import Mailman.configuration.config. The latter is an object that's guaranteed to exist, but not guaranteed to be initialized until some top-level script calls config.load(). The latter should be called with the argument to -C/--config which is a new convention the above scripts have been given. In most cases, where mm_cfg.<variable> is used config.<variable> can be used, but the exceptions are where the default value must be available before config.load() is called. Sometimes you can import Mailman.Default and get the variable from there, but other times the code has to be changed to work around this limitation. Take each on a case-by-case basis. Note that the various directories calculated from VAR_PREFIX, EXEC_PREFIX, and PREFIX are now calculated in config.py, not in Defaults.py. This way a configuration file can override the base directories and everything should work correctly. Other changes here include: - mailmanctl, qrunner, and update are switched to optparse and $-strings, and changed to the mmshell architecture - An etc directory has been added to /usr/local/mailman and a mailman.cfg.sample file is installed there. Sites should now edit an etc/mailman.cfg file to do their configurations, although the mm_cfg file is still honored. The formats of the two files are identical. - list_lists is given the -C/--config option - Some coding style fixes in bin/update, but not extensive - Get rid of nested scope hacks in qrunner.py - A start on getting EmailBase tests working (specifically test_message), although not yet complete.
* - Fixes to further remove the old Syslog from bin and cron scripts. Note thatbwarsaw2006-04-241-2/+1
| | | | | | | | | | | I didn't update cron/mailpasswds because that is going away. cron/disabled and cron/gate_news are only minimally tested. - Instead of using the RotatingFileHandler for our logs, use our own ReopenableFileHandler, which only minimally derives from FileHandler and implements a reopen() method. I think it's generally better to leave file rotation to external tools such as logrotate. - Remove some Python 2.1 compatibility stuff. - Ignore .mo files in messages/vi/LC_MESSAGES
* - Convert all logging to Python's standard logging module. Get rid of allbwarsaw2006-04-171-19/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | traces of our crufty old Syslog. Most of this work was purely mechanical, except for: 1) Initializing the loggers. For this, there's a new module Mailman/loginit.py (yes all modules from now on will use PEP 8 names). We can't call this 'logging.py' because that will interfere with importing the stdlib module of the same name (can you say Python 2.5 and absolute imports?). If you want to write log messages both to the log file and to stderr, pass True to loginit.initialize(). This will turn on propagation of log messages to the parent 'mailman' logger, which is set up to print to stderr. This is how bin/qrunner works when not running as a subprocess of mailmanctl. 2) The driver script. I had to untwist the StampedLogger stuff and implement differently printing exceptions and such to log/error because standard logging objects don't have a write() method. So we write to a cStringIO and then pass that to the logger. 3) SMTPDirect.py because of the configurability of the log messages. This required changing SafeDict into a dict subclass (which is better than using UserDicts anyway -- yay Python 2.3!). It's probably still possible to flummox things up if you change the name of the loggers in the SMTP_LOG_* variables in mm_cfg.py. However, the worst you can do is cause output to go to stderr and not go to a log file. Note too that all entry points into the Mailman system must call Mailman.loginit.initialize() or the log output will go to stderr (which may occasionally be what you want). Currently all CGIs and qrunners should be working properly. I wish I could have tested all code paths that touch the logger, but that's infeasible. I have tested this, but it's possible that there were some mistakes in the translation. - Mailman.Bouncers.BounceAPI.Stop is a singleton, but not a class instance any more. - True/False code cleanup, PEP 8 import restructuring, whitespace normalization, and copyright year updates, as appropriate.
* http://mail.python.org/pipermail/mailman-developers/2006-January/018548.htmltkikuchi2006-01-191-4/+12
| | | | | | Before we startup qrunners, we redirect the stderr to mailman syslog. We assume !AS_SUBPROC is running for debugging purpose and don't log errors in mailman logs/error but keep printing to stderr.
* FSF office has moved. chdcking in for MAIN branch.tkikuchi2005-08-271-1/+1
|
* Jon Parise's patch to improve the usage() output for the command linebwarsaw2002-10-211-2/+6
| | | | | | and cron scripts. When code/status == 0, there's no error (it's likely --help output) so send that to stdout. Otherwise, it's an error and the output goes to stderr.
* In the LogStdErr() call, we don't need to pass in the tee argument,bwarsaw2002-10-211-1/+1
| | | | since the default is fine.
* make_qrunner(): We really need to log more information about thebwarsaw2002-04-081-0/+1
| | | | | import error. This probably would have helped Brett Delmage debug his problem easier.
* Update copyright years.bwarsaw2002-03-161-1/+1
|
* Added -s/--subproc switch which subtly, but usefully changes its exitbwarsaw2001-11-211-3/+19
| | | | | | | semantics. When run as a subproc, any ImportErrors caused by bogus qrunner names simply get logged, and the script exits with an error code == SIGTERM. This tells mailmanctl not to try to infinitely restart it.
* tee_to_stdout=1 in the error handler.bwarsaw2001-11-201-1/+1
|
* Rebind stderr to logs/error.bwarsaw2001-10-241-0/+3
|
* A major rewrite to 1) better support the new mailmanctl script and 2)bwarsaw2001-10-181-23/+173
| | | | | | | | | | | | | | | to hopefully lay the groundwork for a MM2.0.x compatible cron-invoked qrunner process. This qrunner responds to SIGINT, SIGTERM, and SIGHUP as described in the mailmanctl docstring. It also added a more robust -r/--runner flag to support mailmanctl invoking multiple qrunners per queue via slicing. The default now is to run continuously, unless -o/--once is given, and if multiple -r/--runner flags are given, they will be run in roundrobin format. This should be all we need to implement a backwards compatible cron/qrunner script.
* Ben Gertzfield's patch to hardcode the path to the python executablebwarsaw2001-09-071-1/+1
| | | | | | | | | | | | | into the script's #! line -- based on --with-python settings, without losing CVS revision history. #! /usr/bin/env python becomes #! @PYTHON@ which gets substituted for in configure.
* intermediatebwarsaw2001-07-051-0/+96