The seedbox.process.workflow Module

Workflow implementation that handles automatic execution.

Continues to process each step until the workflow reaches completion.

wf = Workflow(torrent)
tasks = wf.next_tasks()
# execute tasks in separate threads
<<logic>>
# now move the workflow to the next step
wf.run()
class seedbox.process.workflow.Workflow(dbapi, torrent)

Bases: seedbox.process.flow.BaseFlow

Implementation that handles the orchestration of the process

activate

Executes all the tasks for a torrent at activate phase

cancel

NoOp function, ignores all arguments.

complete

Executes all the tasks for a torrent at complete phase

prepare

Executes all the tasks for a torrent at prepare phase

run()

Orchestrate each step of the process based on current state

state

Property-like attribute holding the state of a WorkflowEnabled object.

The state is stored in the internal __dict__ of the instance.