summaryrefslogtreecommitdiff
path: root/src/mailman/bin/docs
diff options
context:
space:
mode:
authorBarry Warsaw2011-06-01 17:09:32 -0400
committerBarry Warsaw2011-06-01 17:09:32 -0400
commitbf8b285acb8c2500e52ae2582f27513b9842de54 (patch)
tree53e30be0bb665d66a9350fe58d22697c4c0a860e /src/mailman/bin/docs
parent0f85fb344688e1982e9320e79b7fb38eefc1ac53 (diff)
downloadmailman-bf8b285acb8c2500e52ae2582f27513b9842de54.tar.gz
mailman-bf8b285acb8c2500e52ae2582f27513b9842de54.tar.zst
mailman-bf8b285acb8c2500e52ae2582f27513b9842de54.zip
Major terminology shift:
* Queue runners are now called just 'Runners' since several of them don't manage queue directories. * Ban the term 'qrunner' too. * The master queue runner watcher should now just be called the 'master' or the 'master runner'. * bin/qrunner -> bin/runner * mailman.qrunner log file -> mailman.runner * master-qrunner.lck -> master.lck * master-qrunner.pid -> master.pid Also: * Remove some obsolete files * Begin the .txt -> .rst renaming
Diffstat (limited to 'src/mailman/bin/docs')
-rw-r--r--src/mailman/bin/docs/master.rst53
-rw-r--r--src/mailman/bin/docs/master.txt51
2 files changed, 53 insertions, 51 deletions
diff --git a/src/mailman/bin/docs/master.rst b/src/mailman/bin/docs/master.rst
new file mode 100644
index 000000000..c4410bf16
--- /dev/null
+++ b/src/mailman/bin/docs/master.rst
@@ -0,0 +1,53 @@
+======================
+Mailman runner control
+======================
+
+Mailman has a number of *runner subprocesses* which perform long-running tasks
+such as listening on an LMTP port, processing REST API requests, or processing
+messages in a queue directory. In normal operation, the ``bin/mailman``
+command is used to start, stop and manage the runners. This is just a wrapper
+around the real master watcher, which handles runner starting, stopping,
+exiting, and log file reopening.
+
+ >>> from mailman.testing.helpers import TestableMaster
+
+Start the master in a sub-thread.
+
+ >>> master = TestableMaster()
+ >>> master.start()
+
+There should be a process id for every runner that claims to be startable.
+
+ >>> from lazr.config import as_boolean
+ >>> startable_runners = [conf for conf in config.runner_configs
+ ... if as_boolean(conf.start)]
+ >>> len(list(master.runner_pids)) == len(startable_runners)
+ True
+
+Now verify that all the runners are running.
+::
+
+ >>> import os
+
+ # This should produce no output.
+ >>> for pid in master.runner_pids:
+ ... os.kill(pid, 0)
+
+Stop the master process, which should also kill (and not restart) the child
+runner processes.
+
+ >>> master.stop()
+
+None of the children are running now.
+
+ >>> import errno
+ >>> for pid in master.runner_pids:
+ ... try:
+ ... os.kill(pid, 0)
+ ... print 'Process did not exit:', pid
+ ... except OSError as error:
+ ... if error.errno == errno.ESRCH:
+ ... # The child process exited.
+ ... pass
+ ... else:
+ ... raise
diff --git a/src/mailman/bin/docs/master.txt b/src/mailman/bin/docs/master.txt
deleted file mode 100644
index d3c07c768..000000000
--- a/src/mailman/bin/docs/master.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-============================
-Mailman queue runner control
-============================
-
-Mailman has a number of queue runners which process messages in its queue file
-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
-
-Start the master in a sub-thread.
-
- >>> master = TestableMaster()
- >>> master.start()
-
-There should be a process id for every qrunner that claims to be startable.
-
- >>> from lazr.config import as_boolean
- >>> startable_qrunners = [qconf for qconf in config.qrunner_configs
- ... if as_boolean(qconf.start)]
- >>> len(list(master.qrunner_pids)) == len(startable_qrunners)
- True
-
-Now verify that all the qrunners are running.
-::
-
- >>> import os
-
- # This should produce no output.
- >>> for pid in master.qrunner_pids:
- ... os.kill(pid, 0)
-
-Stop the master process, which should also kill (and not restart) the child
-queue runner processes.
-
- >>> master.stop()
-
-None of the children are running now.
-
- >>> import errno
- >>> for pid in master.qrunner_pids:
- ... try:
- ... os.kill(pid, 0)
- ... print 'Process did not exit:', pid
- ... except OSError, error:
- ... if error.errno == errno.ESRCH:
- ... # The child process exited.
- ... pass
- ... else:
- ... raise