diff options
| author | Barry Warsaw | 2010-12-22 16:38:32 -0500 |
|---|---|---|
| committer | Barry Warsaw | 2010-12-22 16:38:32 -0500 |
| commit | 506ddd3af859ebb9d6b8fcf746b286a030a0b927 (patch) | |
| tree | 9a3bfd5244a8fe54cbe24edd7c30536e01c36bc9 /src/mailman/commands/docs | |
| parent | ecb3dbbacd350845ae11834ac42c17469811bdfa (diff) | |
| download | mailman-506ddd3af859ebb9d6b8fcf746b286a030a0b927.tar.gz mailman-506ddd3af859ebb9d6b8fcf746b286a030a0b927.tar.zst mailman-506ddd3af859ebb9d6b8fcf746b286a030a0b927.zip | |
* Start to get rid of pylint; it's more trouble than it's worth and pyflakes
does a pretty good job anyway.
* Remove master.get_lock_data() now that flufl.lock 2.1 provides the same
detailed information.
* Add WatcherState.none to indicate that the master is not running.
* Instrument master_state() and acquire_lock_1() for testing, and add
unittests.
* LBYL for 'bin/mailman start' so that the error message when the master is
already running happens in the foreground process and is more user friendly.
* Add 'bin/mailman status' to provide master queue runner status on the
command line.
Diffstat (limited to 'src/mailman/commands/docs')
| -rw-r--r-- | src/mailman/commands/docs/status.txt | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/mailman/commands/docs/status.txt b/src/mailman/commands/docs/status.txt new file mode 100644 index 000000000..6deb7fdc0 --- /dev/null +++ b/src/mailman/commands/docs/status.txt @@ -0,0 +1,37 @@ +============== +Getting status +============== + +The status of the Mailman master process can be queried from the command line. +It's clear at this point that nothing is running. +:: + + >>> from mailman.commands.cli_status import Status + >>> status = Status() + + >>> class FakeArgs: + ... pass + +The status is printed to stdout and a status code is returned. + + >>> status.process(FakeArgs) + GNU Mailman is not running + 0 + +We can simulate the master queue runner starting up by acquiring its lock. + + >>> from flufl.lock import Lock + >>> lock = Lock(config.LOCK_FILE) + >>> lock.lock() + +Getting the status confirms that the master queue runner is running. + + >>> status.process(FakeArgs) + GNU Mailman is running (master pid: ... + +We shutdown the master queue runner, and confirm the status. + + >>> lock.unlock() + >>> status.process(FakeArgs) + GNU Mailman is not running + 0 |
