exorcist.taskdb.TaskStatusDB¶
- class exorcist.taskdb.TaskStatusDB(engine: Engine)¶
Database for managing execution and orchestration of tasks.
This implementation is built on SQLAlchemy. For simple usage, the recommendation is to use the
from_filename()method to create this object, rather than its__init__. The__init__method takes a SQLAlchemy engine, which provides much more flexibility in choice of backend.- __init__(engine: Engine)¶
Methods
__init__(engine)add_task(taskid, requirements, max_tries)Add a task to the database.
add_task_network(taskid_network, max_tries)Add a network of tasks to the database.
check_out_task()Select a task to be run.
from_filename(filename, *[, overwrite])Create an sqlite dialect database from a filename.
get_all_tasks()Yield current row for all tasks.
mark_task_completed(taskid, success)Update the database when a task has completed.
Attributes
dependencies_tableSQLAlchemy table for
depedenciestasks_tableSQLAlchemy table for
tasks