asynqueue.tasks.AssignmentFactory(object)
class documentation
Part of asynqueue.tasks
(View In Hierarchy)
I generate Assignment
instances for workers to handle particular tasks.
Method | __init__ | Undocumented |
Method | cancelRequests | Cancel this worker's assignment requests |
Method | request | Called to request a new assignment in the specified series of tasks for the supplied worker. |
Method | new | Creates and queues a new assignment for the supplied task, returning a deferred that fires when the assignment has been accepted. |
Called to request a new assignment in the specified series of tasks for the supplied worker.
When a new assignment in the series is finally ready in the queue for
this worker, the Deferred
for the assignment request will fire
with an instance of Assignment
that has
been constructed with the task to be assigned.
If the worker is still gainfully employed when it accepts the assignment, and is not just wrapping up its work after having been fired, the worker will request another assignment when it finishes the task.