runners

class anadama2.runners.BaseRunner(run_context)[source]
run_tasks(task_idx_deque)[source]
class anadama2.runners.DryRunner(run_context)[source]
run_tasks(task_idx_deque)[source]
sublist_template = ' - {} ({})'
class anadama2.runners.GridRunner(workflow)[source]
add_worker(worker_class, name, rate=1, default=False)[source]
cleanup()[source]
route(task_no)[source]
run_tasks(task_idx_deque)[source]
terminate()[source]
class anadama2.runners.ParallelLocalRunner(run_context, jobs)[source]
cleanup()[source]
run_tasks(task_idx_deque)[source]
terminate()[source]
class anadama2.runners.ParallelLocalWorker(work_q, result_q, lock, reporter)[source]
static appropriate_lock()[source]
static appropriate_q_class(*args, **kwargs)[source]
run()[source]

Method to be run in sub-process; can be overridden in sub-class

class anadama2.runners.SerialLocalRunner(run_context)[source]
run_tasks(task_idx_deque)[source]
exception anadama2.runners.TaskFailed(msg, task_no)[source]
class anadama2.runners.TaskResult[source]

The result of a task’s execution.

Parameters:
  • task_no – The number of the task that produced this result.
  • error – The error generated by executing the task. None if the task was successful.
  • dep_keys (list of list of str) – The list of .name attributes from the objects of type anadama2.tracked.Base associated with this task. These keys are used with the storage backend to save successful task results.
  • dep_compares – The list of the results of the compare() method from the objects of type anadama2.tracked.Base associated with this task. These values are used with the storage backend to save successful task results.
Type:

int

Type:

str or None

anadama2.runners.current_grid_runner(context)[source]
anadama2.runners.default(run_context, jobs)[source]
anadama2.runners.exception_result(exc)[source]
anadama2.runners.parent_failed_result(idx, parent_idx)[source]
anadama2.runners.worker_run_loop(work_q, result_q, run_task, reporter=None, lock=None)[source]