summaryrefslogtreecommitdiff
path: root/mailman/queue/docs/command.txt
diff options
context:
space:
mode:
authorBarry Warsaw2008-08-12 23:33:48 -0400
committerBarry Warsaw2008-08-12 23:33:48 -0400
commit1822c649436477bbfc81ab036933529abe83bbf2 (patch)
treefb829429cebc8c4d2129788ce7e8f52608bac5bc /mailman/queue/docs/command.txt
parentb42f3204f7223f3ce9ae306dcb2cec10853eca8d (diff)
parentae24685f77661f19ee0357e9328737b6a3251596 (diff)
downloadmailman-1822c649436477bbfc81ab036933529abe83bbf2.tar.gz
mailman-1822c649436477bbfc81ab036933529abe83bbf2.tar.zst
mailman-1822c649436477bbfc81ab036933529abe83bbf2.zip
Merge in command refactoring branch.
Begin to flesh out the tests for the join command. Refactor out notifications from the add_member() function.
Diffstat (limited to 'mailman/queue/docs/command.txt')
-rw-r--r--mailman/queue/docs/command.txt65
1 files changed, 65 insertions, 0 deletions
diff --git a/mailman/queue/docs/command.txt b/mailman/queue/docs/command.txt
index c18e7a34c..470a632b7 100644
--- a/mailman/queue/docs/command.txt
+++ b/mailman/queue/docs/command.txt
@@ -104,3 +104,68 @@ message is plain text.
<BLANKLINE>
- Done.
<BLANKLINE>
+
+
+Stopping command processing
+---------------------------
+
+The 'end' command stops email processing, so that nothing following is looked
+at by the command queue.
+
+ >>> msg = message_from_string("""\
+ ... From: cperson@example.com
+ ... To: test-request@example.com
+ ... Message-ID: <caribou>
+ ...
+ ... echo foo bar
+ ... end ignored
+ ... echo baz qux
+ ... """)
+
+ >>> inject_message(mlist, msg, qdir=config.CMDQUEUE_DIR)
+ >>> command.run()
+ >>> len(virgin_queue.files)
+ 1
+ >>> item = get_queue_messages(virgin_queue)[0]
+ >>> print item.msg.as_string()
+ Subject: The results of your email commands
+ ...
+ <BLANKLINE>
+ - Results:
+ echo foo bar
+ <BLANKLINE>
+ - Unprocessed:
+ echo baz qux
+ <BLANKLINE>
+ - Done.
+ <BLANKLINE>
+
+The 'stop' command is an alias for 'end'.
+
+ >>> msg = message_from_string("""\
+ ... From: cperson@example.com
+ ... To: test-request@example.com
+ ... Message-ID: <caribou>
+ ...
+ ... echo foo bar
+ ... stop ignored
+ ... echo baz qux
+ ... """)
+
+ >>> inject_message(mlist, msg, qdir=config.CMDQUEUE_DIR)
+ >>> command.run()
+ >>> len(virgin_queue.files)
+ 1
+ >>> item = get_queue_messages(virgin_queue)[0]
+ >>> print item.msg.as_string()
+ Subject: The results of your email commands
+ ...
+ <BLANKLINE>
+ - Results:
+ echo foo bar
+ <BLANKLINE>
+ - Unprocessed:
+ echo baz qux
+ <BLANKLINE>
+ - Done.
+ <BLANKLINE>