Home | Trees | Indices | Help |
---|
|
This object is designed to be inherited by a class in client code. This inheriting class can override the workflow() method to define the tasks that need to be run and their dependencies.
The inheriting class defining a workflow can be executed in client code by calling the WorkflowRunner.run() method. This method provides various run options such as whether to run locally or on sge.
|
|||
_AbortWorkflowException |
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Integer value or 'unlimited' |
|
||
|
|||
Integer value or 'unlimited' |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from |
|
|||
Either 'unlimited', or a string representation of the integer limit |
|
||
|
|||
|
|||
|
|
|||
_maxWorkflowRecursion = 30 This limit protects against a runaway forkbomb in case a workflow task recursively adds itself w/o termination: |
|||
_allStop = <threading._Event object>
|
|
|||
Inherited from |
|
Call this method to execute the workflow() method overridden in a child class and specify the resources available for the workflow to run. Task retry behavior: Retry attempts will be made per the arguments below for distributed workflow runs (eg. sge run mode). Note this means that retries will be attempted for tasks with an 'isForceLocal' setting during distributed runs. Task error behavior: When a task error occurs the task manager stops submitting new tasks and allows all currently running tasks to complete. Note that in this case 'task error' means that the task could not be completed after exhausting attempted retries. Workflow exception behavior: Any exceptions thrown from the python code of classes derived from WorkflowRunner will be logged and trigger notification (e.g. email). The exception will not come down to the client's stack. In sub-workflows the exception is handled exactly like a task error (ie. task submission is shut-down and remaining tasks are allowed to complete). An exception in the master workflow will lead to workflow termination without waiting for currently running tasks to finish.
|
Add task to workflow, including resource requirements and specification of dependencies. Dependency tasks must already exist in the workflow.
|
Add another WorkflowRunner instance as a task to this workflow. The added Workflow's workflow() method will be called once the dependencies specified in this call have completed. Once started, all of the submitted workflow's method calls (like addTask) will be placed into the enclosing workflow instance and bound by the run parameters of the enclosing workflow. This task will be marked complete once the submitted workflow's workflow() method has finished, and any tasks it initiated have completed. Note that all workflow tasks will have their own tasks namespaced with the workflow task label. This namespace is recursive in the case that you add workflow tasks which add their own workflow tasks, etc. Note that the submitted workflow instance will be deep copied before being altered in any way.
|
Wait for a list of tasks to complete.
|
Query if a specific task is in the workflow and completed without error. This can assist workflows with providing stable interrupt/resume behavior.
|
Query if a specific task is in the workflow and is done, with or without error This can assist workflows with providing stable interrupt/resume behavior.
|
Cancel the given task and all of its dependencies. Canceling means that any running jobs will be stopped and any waiting job will be unqueued. Canceled tasks will not be treated as errors. Canceled tasks that are not already complete will be put into the waiting/ignored state. |
Get the current run mode This can be used to access the current run mode from within the workflow function. Although the runmode should be transparent to client code, this is occasionally needed to hack workarounds.
|
Get the current run core limit This function can be used to access the current run's core limit from within the workflow function. This can be useful to eg. limit the number of cores requested by a single task.
|
Takes an task nCores argument and reduces it to the maximum value allowed for the current run.
|
Get the current run's total memory limit (in megabytes)
|
Takes a task memMb argument and reduces it to the maximum value allowed for the current run.
|
Get isDryRun flag value. When the dryrun flag is set, no commands are actually run. Querying this flag allows dynamic workflows to correct for dry run behaviors, such as tasks which do no produce expected files.
|
Get the default core limit for run mode (local,sge,..)
|
Send a message to the WorkflowRunner's log.
|
Workflow definition defined in child class This method should be overridden in the class derived from WorkflowRunner to specify the actual workflow logic. Client code should not call this method directly. |
|
|
|
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Fri May 19 16:44:20 2017 | http://epydoc.sourceforge.net |