| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
|
| |
- Also introduce IWorkflow, ISubscriptionWorkflow,
IUnsubscriptionWorkflow.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* Make sure Registrar.discard() removces any workflow state manager state
associated with the token, and that this is flushed to SA.
* Adjust the email commands to the new IRegistrar API.
* Update the IRegistrar interface.
* Add IWorkflowStateManager.discard() and make `count` an attribute/property.
* Mark two tests as expected failures due to LP: #1444184.
|
| |
|
|
|
| |
* The workflow state manager no longer allows updates via .save().
* Restoring a workflow state evicts the record from the database.
|
| |
|
|
|
|
|
|
|
|
| |
To handle the case of restoring a saved workflow, allow the subscriber to be
None in the constructor, but assert that it is not None after the first
workflow step.
Add setters/getters for handling save/restore.
In the base workflow interface, rename key to token.
|
|
|
* 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.
|