Workflow
Represents a workflow in the scheduler.
Inherits from Job and is used to define workflows with specific configurations.
next_job_id
property
Returns a generator for the next task ID in the workflow.
add_job(job)
Adds a task to the workflow.
:param job: The Task instance to add.
get_env_vars_copy()
Returns a copy of the environment variables for the Workflow instance.
rerun(run_id, version=None, full=False)
Rerun a run id with specific version (latest version by default). If full is true then all the tasks will be rerun, including the ones that already ran successfully.
:param run_id: The run id to rerun. :param version: The version to rerun. If None, it will rerun the latest version. :param full: If True, it will rerun the full workflow, including the ones that already ran successfully. :return: A tuple of (success: bool, message: str).
reset()
Reset the Workflow instance to its initial state.
set_local_run(local_run)
Set the local run flag for the Workflow instance.
:param local_run: A boolean indicating whether to run locally.
to_dict()
Convert the Workflow instance to a dictionary representation.
to_json()
Convert the Workflow instance to a JSON string representation.