summaryrefslogtreecommitdiff
path: root/src/mailman/core/runner.py
Commit message (Collapse)AuthorAgeFilesLines
* Convert to click for CLI optionsBarry Warsaw2017-07-221-3/+5
|
* Fix signal handler exception.Barry Warsaw2017-02-011-14/+15
|
* Handle PEP 475 fallout.Barry Warsaw2017-01-281-2/+13
| | | | | | | | | | | | | | | Closes #255 As of Python 3.5, PEP 475 gets in our way. Runners with long time.sleep()'s in their _snooze() method (e.g. the retry runner) will have their system call implemented time.sleep() automatically retried at the C layer. The only reliable way to prevent this is to raise an exception in the signal handler. The standard run() method automatically suppresses this exception, meaning, it's caught and ignored, but effectively breaks the run() loop, which is just what we want. The lmtp and rest runners implement their own run loops, so they also have to handle this exception, by ignoring it.
* Bump copyright years.Barry Warsaw2017-01-041-1/+1
|
* Use `atpublic` for @public instead of internal copy.Barry Warsaw2016-11-291-1/+1
|
* New template system. Closes #249Barry Warsaw2016-07-161-1/+1
| | | | | The new template system is introduced for API 3.1. See ``src/mailman/rest/docs/templates.rst`` for details.
* Use contextlib.suppress() where appropriate.Barry Warsaw2016-04-301-5/+3
|
* Clean up the core directory.Barry Warsaw2016-03-241-8/+4
| | | | | | | mailman/core/errors.py is gone now. We had a duplicate base exception which now always comes from mailman/interfaces/errors.py. Obsolete/unused exceptions are remove. The other exceptions are moved to better locations.
* Happy New Year.Barry Warsaw2016-01-021-1/+1
|
* We don't need the 'six' package any more.Barry Warsaw2015-01-041-1/+1
|
* Bump copyright years.Barry Warsaw2015-01-041-1/+1
|
* Even if we're not loading a user-defined mailman.cfg file (i.e. the user ranBarry Warsaw2015-01-021-5/+6
| | | | | | | `mailman info` after first install and we're creating the var dir), we still need to post-process so we get the UPPERCASE_DIR variables. Fix an UnboundNameError in the error printing.
* Remove huge amounts of now unnecessary file boilerplate.Barry Warsaw2014-12-221-3/+0
|
* Use listid instead of (fqdn) listname in the metadata pickle.Barry Warsaw2014-12-151-3/+12
| | | | | | load_external() now always opens in utf-8 mode. More test repair.
* Checkpointing.Barry Warsaw2014-11-301-8/+7
| | | | | | | | | | By using `six` I think I have most of the imports squared away. There's probably still uses of `unicode` built-ins that need fixing. The idea is to first get the test suite running (which it doesn't yet), and then to fix tests. There's a bug in lazr.config which requires us to patch it for now.
* Bump copyright years.Barry Warsaw2014-01-011-1/+1
|
* * `bin/runner` command has been simplified and its command line optionsBarry Warsaw2013-06-171-1/+25
| | | | | | | | | | | | | | | | | | | | | | | | reduced. Now, only one `-r/--runner` option may be provided and the round-robin feature has been removed. * Fixed REST server crash on `reopen` command. Identification and test provided by Aurélien Bompard. (LP: #1184376) Also: * bin/runner now uses standard argparse instead of ScriptOptions. * The entire bin/runner machinery has bee reorganized and simplified. There * is no more Loop class. Signal setting is moved directly into the base Runner class and overrided in specific subclasses (e.g. RESTRunner which must cleanly shutdown its TCPServer). The runner exit status is now set directly on the Runner instance. * Fixed a few minor style issues. * In order to cleanly shutdown the RESTRunner's WSGI server, we must start a subthread which only watches for an Event and then calls the server's shutdown() method. It has to be this way because the WSGI server itself (due to interactions with SQLite), and the signal handlers (due to Python's signal handling semantics) must both run in the main thread. However, the shutdown() must be invoked from a subthread in order to prevent deadlock. * Refactor the RESTLayer to eliminate duplication of code.
* * Non-queue runners should not create ``var/queue`` subdirectories. Fixed byBarry Warsaw2013-01-201-3/+10
|\ | | | | | | Sandesh Kumar Agrawal. (LP: #1095422)
| * changeSandesh Kumar Agrawal2013-01-171-1/+0
| |
| * Test added to non_queue_runner bugSandesh Kumar Agrawal2013-01-171-2/+9
|/
* Bump copyright years.Barry Warsaw2013-01-011-1/+1
|
* * When a queue runner gets an exception in its _dispose() method, aBarry Warsaw2012-05-111-2/+8
| | | | | | `RunnerCrashEvent` is triggered, which contains references to the queue runner, mailing list, message, metadata, and exception. Interested parties can subscribe to that `zope.event` for notification.
* General code cleanup.Barry Warsaw2012-04-251-4/+3
| | | | | | | | - Add explicit dependency on zope.event in setup.py. - Use Python 3 compatible syntax for specifying that a class implements an interface, i.e. the @implementer class decorator. - print_function futures. - Whitespace normalization.
* * The `confirm` email command now properly handles `Re:`-like prefixes, evenBarry Warsaw2012-02-261-2/+2
| | | | | | | | | | | | if they contain non-ASCII characters. (LP: #685261) Also: - When the registrar confirms an email address, the verified_on value gets set using the Mailman datetime interface. This simply improves testability for that API. - In Runner._one_iteration(), be sure to commit the database transaction *before* calling _short_circuit().
* copybumpBarry Warsaw2012-01-011-1/+1
|
* Major terminology shift:Barry Warsaw2011-06-011-5/+6
| | | | | | | | | | | | | | | | | * 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
* Rename 'queue' directory to 'runners' since not all subprocesses run a queue.Barry Warsaw2011-05-291-0/+249