| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
Restore the attributes in the order they are declared in
`SAVE_ATTRIBUTES` to allow for dependencies between attributes (required
by the `SubscriptionWorkflow`).
|
| |
|
|
|
|
|
|
|
| |
Also:
* Ignore coverage in the testing submodule.
* Remove some unreachable code.
* Spelling.
* Fix a bug in run_thru().
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This merges the SubscriptionManager and UnsubscriptionManager into a
single SubscriptionManager implementation that handles both register()
and unregister(). This allows us to use direct class-based adaptation
instead of the more clunky getAdapter() API. We can also eliminate the
funky _get_workflow() implementation detail.
This has a couple of side-effects. .confirm() must lookup the token in
the pendings database and pull out the pending type, dispatching to the
proper class depending on the type, or raising a LookupError if the
token is None or there is no pendable associated with the given token.
This feels like an acceptable trade-off.
However, this *also* means that IWorkflowStateManager must lose its
'name' argument in its methods. That's because we won't actually know
the name until its too late. Honestly, the name wasn't providing much
value anyway (it was always the subclass's name), so losing that seems
fine too. The complication here is that the name was a primary key in
the 'workflowstate' table, so we need to add its removal in the database
migration.
|
| |
|
|
|
|
|
|
| |
* Get rid of explicit __all__ settings and use the @public decorator.
* Get rid of ^L's
* Use expected_count argument for get_queue_messages()
* Various code modernizations.
* Other minor changes to make flake8 happy.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
pendable data since that gets added automatically by the IPendings utility.
After the user is subscribed, clean up the saved workflows and reset the token
to None.
Give the SubscriptionWorkflow a name property for convenience.
|
| |
|
|
|
|
|
|
|
|
| |
* TO DO:
- hook up sending of confirmation
- processing confirmations and continuing workflow
- get tokens for saving workflows
- integrate with RequestRecord
- integrate with hold_subscription
- after getting moderator approval, continue workflow
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
* save_state() -> save()
* restore_state() -> restore()
* Add push() as the public API for pushing new state on the deque.
* Uppercase class attributes.
* Add logging on exception.
* Minor style fixes.
|
|
|
* Move the basic Workflow class to a module in mailman.app.
* Rename the interface and model modules.
* Update the configure.zcml.
* Minor style fixes.
* Add a test for the workflow model.
|