summaryrefslogtreecommitdiff
path: root/mailman/queue/docs/runner.txt
diff options
context:
space:
mode:
authorBarry Warsaw2009-01-25 13:01:41 -0500
committerBarry Warsaw2009-01-25 13:01:41 -0500
commiteefd06f1b88b8ecbb23a9013cd223b72ca85c20d (patch)
tree72c947fe16fce0e07e996ee74020b26585d7e846 /mailman/queue/docs/runner.txt
parent07871212f74498abd56bef3919bf3e029eb8b930 (diff)
downloadmailman-eefd06f1b88b8ecbb23a9013cd223b72ca85c20d.tar.gz
mailman-eefd06f1b88b8ecbb23a9013cd223b72ca85c20d.tar.zst
mailman-eefd06f1b88b8ecbb23a9013cd223b72ca85c20d.zip
Diffstat (limited to 'mailman/queue/docs/runner.txt')
-rw-r--r--mailman/queue/docs/runner.txt72
1 files changed, 0 insertions, 72 deletions
diff --git a/mailman/queue/docs/runner.txt b/mailman/queue/docs/runner.txt
deleted file mode 100644
index d24a8334c..000000000
--- a/mailman/queue/docs/runner.txt
+++ /dev/null
@@ -1,72 +0,0 @@
-Queue runners
-=============
-
-The queue runners (qrunner) are the processes that move messages around the
-Mailman system. Each qrunner is responsible for a slice of the hash space in
-a queue directory. It processes all the files in its slice, sleeps a little
-while, then wakes up and runs through its queue files again.
-
-
-Basic architecture
-------------------
-
-The basic architecture of qrunner is implemented in the base class that all
-runners inherit from. This base class implements a .run() method that runs
-continuously in a loop until the .stop() method is called.
-
- >>> mlist = config.db.list_manager.create(u'_xtest@example.com')
- >>> mlist.preferred_language = u'en'
-
-Here is a very simple derived qrunner class. Queue runners use a
-configuration section in the configuration files to determine run
-characteristics, such as the queue directory to use. Here we push a
-configuration section for the test runner.
-
- >>> config.push('test-runner', """
- ... [qrunner.test]
- ... max_restarts: 1
- ... """)
-
- >>> from mailman.queue import Runner
- >>> class TestableRunner(Runner):
- ... def _dispose(self, mlist, msg, msgdata):
- ... self.msg = msg
- ... self.msgdata = msgdata
- ... return False
- ...
- ... def _do_periodic(self):
- ... self.stop()
- ...
- ... def _snooze(self, filecnt):
- ... return
-
- >>> runner = TestableRunner('test')
-
-This qrunner doesn't do much except run once, storing the message and metadata
-on instance variables.
-
- >>> msg = message_from_string("""\
- ... From: aperson@example.com
- ... To: _xtest@example.com
- ...
- ... A test message.
- ... """)
- >>> switchboard = config.switchboards['test']
- >>> filebase = switchboard.enqueue(msg, listname=mlist.fqdn_listname,
- ... foo='yes', bar='no')
- >>> runner.run()
- >>> print runner.msg.as_string()
- From: aperson@example.com
- To: _xtest@example.com
- <BLANKLINE>
- A test message.
- <BLANKLINE>
- >>> dump_msgdata(runner.msgdata)
- _parsemsg: False
- bar : no
- foo : yes
- lang : en
- listname : _xtest@example.com
- version : 3
-
-XXX More of the Runner API should be tested.