diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/mailman/bin/docs/master.txt | 6 | ||||
| -rw-r--r-- | src/mailman/bin/master.py | 17 | ||||
| -rw-r--r-- | src/mailman/bin/qrunner.py | 32 | ||||
| -rw-r--r-- | src/mailman/commands/cli_control.py | 10 | ||||
| -rw-r--r-- | src/mailman/core/logging.py | 3 | ||||
| -rw-r--r-- | src/mailman/docs/ALPHA.txt | 10 |
6 files changed, 38 insertions, 40 deletions
diff --git a/src/mailman/bin/docs/master.txt b/src/mailman/bin/docs/master.txt index f44b25214..20eddae2c 100644 --- a/src/mailman/bin/docs/master.txt +++ b/src/mailman/bin/docs/master.txt @@ -3,9 +3,9 @@ Mailman queue runner control ============================ Mailman has a number of queue runners which process messages in its queue file -directories. In normal operation, a command line script called 'mailmanctl' -is used to start, stop and manage the queue runners. mailmanctl actually is -just a wrapper around the real queue runner watcher script called master.py. +directories. In normal operation, the 'bin/mailman' command is used to start, +stop and manage the queue runners. This is just a wrapper around the real +queue runner watcher script called master.py. >>> from mailman.testing.helpers import TestableMaster diff --git a/src/mailman/bin/master.py b/src/mailman/bin/master.py index be1e24b2a..5ce003690 100644 --- a/src/mailman/bin/master.py +++ b/src/mailman/bin/master.py @@ -194,15 +194,14 @@ def acquire_lock(force): if status == WatcherState.conflict: # Hostname matches and process exists. message = _("""\ -The master qrunner lock could not be acquired because it appears -as though another master qrunner is already running. -""") +The master queue runner lock could not be acquired because it appears as +though another master is already running.""") elif status == WatcherState.stale_lock: # Hostname matches but the process does not exist. + program = sys.argv[0] message = _("""\ -The master qrunner lock could not be acquired. It appears as though there is -a stale master qrunner lock. Try re-running mailmanctl with the -s flag. -""") +The master queue runner lock could not be acquired. It appears as though +there is a stale master lock. Try re-running $program with the -s flag.""") else: # Hostname doesn't even match. assert status == WatcherState.host_mismatch, ( @@ -292,7 +291,7 @@ class Loop: self._kids = PIDWatcher() def install_signal_handlers(self): - """Install various signals handlers for control from mailmanctl.""" + """Install various signals handlers for control from the master.""" log = logging.getLogger('mailman.qrunner') # Set up our signal handlers. Also set up a SIGALRM handler to # refresh the lock once per day. The lock lifetime is 1 day + 6 hours @@ -317,7 +316,7 @@ class Loop: log.info('Master watcher caught SIGUSR1. Exiting.') signal.signal(signal.SIGUSR1, sigusr1_handler) # SIGTERM is what init will kill this process with when changing run - # levels. It's also the signal 'mailmanctl stop' uses. + # levels. It's also the signal 'bin/mailman stop' uses. def sigterm_handler(signum, frame): for pid in self._kids: os.kill(pid, signal.SIGTERM) @@ -349,7 +348,7 @@ class Loop: # # Craft the command line arguments for the exec() call. rswitch = '--runner=' + spec - # Wherever mailmanctl lives, so too must live the qrunner script. + # Wherever master lives, so too must live the qrunner script. exe = os.path.join(config.BIN_DIR, 'qrunner') # config.PYTHON, which is the absolute path to the Python interpreter, # must be given as argv[0] due to Python's library search algorithm. diff --git a/src/mailman/bin/qrunner.py b/src/mailman/bin/qrunner.py index 3ecdeb441..8fa95b2b0 100644 --- a/src/mailman/bin/qrunner.py +++ b/src/mailman/bin/qrunner.py @@ -67,20 +67,20 @@ def r_callback(option, opt, value, parser): class ScriptOptions(Options): usage = _("""\ -Run one or more qrunners, once or repeatedly. +Run one or more queue runners, once or repeatedly. Each named runner class is run in round-robin fashion. In other words, the -first named runner is run to consume all the files currently in its -directory. When that qrunner is done, the next one is run to consume all the -files in /its/ directory, and so on. The number of total iterations can be -given on the command line. +first named runner is run to consume all the files currently in its directory. +When that qrunner is done, the next one is run to consume all the files in +/its/ directory, and so on. The number of total iterations can be given on +the command line. Usage: %prog [options] -r is required unless -l or -h is given, and its argument must be one of the names displayed by the -l switch. -Normally, this script should be started from mailmanctl. Running it +Normally, this script should be started from 'bin/mailman start'. Running it separately or with -o is generally useful only for debugging. """) @@ -91,8 +91,8 @@ separately or with -o is generally useful only for debugging. type='string', default=[], action='callback', callback=r_callback, help=_("""\ -Run the named qrunner, which must be one of the strings returned by the -l -option. Optional slice:range if given, is used to assign multiple qrunner +Run the named queue runner, which must be one of the strings returned by the +-l option. Optional slice:range if given, is used to assign multiple qrunner processes to a queue. range is the total number of qrunners for this queue while slice is the number of this qrunner from [0..range). @@ -101,27 +101,27 @@ queue is given the same range value. If slice:runner is not given, then 1:1 is used. Multiple -r options may be given, in which case each qrunner will run once in -round-robin fashion. The special runner `All' is shorthand for a qrunner for +round-robin fashion. The special runner 'All' is shorthand for a qrunner for each listed by the -l option.""")) self.parser.add_option( '-o', '--once', default=False, action='store_true', help=_("""\ -Run each named qrunner exactly once through its main loop. Otherwise, each -qrunner runs indefinitely, until the process receives signal.""")) +Run each named queue runner exactly once through its main loop. Otherwise, +each queue runner runs indefinitely, until the process receives signal.""")) self.parser.add_option( '-l', '--list', default=False, action='store_true', - help=_('List the available qrunner names and exit.')) + help=_('List the available queue runner names and exit.')) self.parser.add_option( '-v', '--verbose', default=0, action='count', help=_("""\ -Display more debugging information to the logs/qrunner log file.""")) +Display more debugging information to the log file.""")) self.parser.add_option( '-s', '--subproc', default=False, action='store_true', help=_("""\ -This should only be used when running qrunner as a subprocess of the -mailmanctl startup script. It changes some of the exit-on-error behavior to -work better with that framework.""")) +This should only be used when running the queue runner as a subprocess of the +'bin/mailman start' startup script. It changes some of the exit-on-error +behavior to work better with that framework.""")) def sanity_check(self): if self.arguments: diff --git a/src/mailman/commands/cli_control.py b/src/mailman/commands/cli_control.py index 3b4bae9b9..e2c450b71 100644 --- a/src/mailman/commands/cli_control.py +++ b/src/mailman/commands/cli_control.py @@ -99,7 +99,7 @@ class Start: pid = os.fork() if pid: # parent - log(_("Starting Mailman's master qrunner")) + log(_("Starting Mailman's master queue runner")) return # child: Create a new session and become the session leader, but since # we won't be opening any terminal devices, don't do the @@ -132,7 +132,7 @@ def kill_watcher(sig): # For i18n convenience print >> sys.stderr, _('PID unreadable in: $config.PIDFILE') print >> sys.stderr, error - print >> sys.stderr, _('Is qrunner even running?') + print >> sys.stderr, _('Is the master even running?') return try: os.kill(pid, sig) @@ -175,7 +175,7 @@ class Stop(SignalCommand): """Stop the Malman daemons.""" name = 'stop' - message = _("Shutting down Mailman's master qrunner") + message = _("Shutting down Mailman's master queue runner") signal = signal.SIGTERM @@ -183,7 +183,7 @@ class Reopen(SignalCommand): """Reopen the Mailman daemons.""" name = 'reopen' - message = _('Reopening the Mailman qrunners') + message = _('Reopening the Mailman queue runners') signal = signal.SIGHUP @@ -193,5 +193,5 @@ class Restart(SignalCommand): implements(ICLISubCommand) name = 'restart' - message = _('Restarting the Mailman qrunners') + message = _('Restarting the Mailman queue runners') signal = signal.SIGUSR1 diff --git a/src/mailman/core/logging.py b/src/mailman/core/logging.py index b1aa9666e..cd88c59aa 100644 --- a/src/mailman/core/logging.py +++ b/src/mailman/core/logging.py @@ -130,7 +130,8 @@ def initialize(propagate=None): log_format = logger_config.format log_datefmt = logger_config.datefmt # Propagation to the root logger is how we handle logging to stderr - # when the qrunners are not run as a subprocess of mailmanctl. + # when the queue runners are not run as a subprocess of 'bin/mailman + # start'. log.propagate = (as_boolean(logger_config.propagate) if propagate is None else propagate) # Set the logger's level. diff --git a/src/mailman/docs/ALPHA.txt b/src/mailman/docs/ALPHA.txt index 976e507f0..66f54ddc7 100644 --- a/src/mailman/docs/ALPHA.txt +++ b/src/mailman/docs/ALPHA.txt @@ -28,8 +28,7 @@ Mailman 3 is now based on the `zc.buildout`_ infrastructure, which greatly simplifies building and testing Mailman. You will need the gettext package (specifically, the msgfmt(1) command) in -order to build the I18N message catalogs. If you're missing this command, -it is known that the digests.txt test will fail. +order to build the I18N message catalogs. You do not need anything other than Python 2.6 and an internet connection to get all the other Mailman 3 dependencies. Here are the commands to @@ -62,13 +61,12 @@ square-bracketed names) and then the key/value pair you want to override. You will need to pass the ``-C`` flag to any bin command you want to invoke, pointing it at your ``mailman.cfg`` file. Or you can set the environment -variable ``$MAILMAN_CONFIG_FILE`` to point to your configuration file. Future -versions will look in some common locations. +variable ``$MAILMAN_CONFIG_FILE`` to point to your configuration file. You can use the ``bin/mailman`` script to create and remove mailing lists, display all the existing mailing lists, subscribe members, etc. Try -``bin/mailman --help`` for details. You can still use the ``bin/mailmanctl`` -script to start the queue runners. +``bin/mailman --help`` for details. You use the ``bin/mailman start`` command +to start the queue runners. Please note that the web u/i does **not** work yet. Contributions are welcome! |
