client.workflow_run

The workflow run is an instance of a workflow.

Attributes

logger

Classes

WorkflowRunFactory

A utility class responsible for instantiating workflow run objects.

WorkflowRun

WorkflowRun enables tracking for multiple runs of a single Workflow.

Module Contents

client.workflow_run.logger[source]
class client.workflow_run.WorkflowRunFactory(workflow_id: int, requester: jobmon.core.requester.Requester | None = None)[source]

A utility class responsible for instantiating workflow run objects.

This class sends the appropriate resume signals so that the parent workflow object is in a state where the newly created workflowrun is ready to run, either on resume or not.

workflow_id[source]
requester[source]
workflow_is_resumable = False[source]
set_workflow_resume(reset_running_jobs: bool = True, resume_timeout: int = 300) None[source]

Set statuses of the given workflow ID’s workflow to a resumable state.

Move active workflow runs to hot/cold resume states, depending on reset_running_jobs.

wait_for_workflow_resume(resume_timeout: int = 300) None[source]
reset_task_statuses(reset_if_running: bool = True) None[source]

Sets the tasks associated with a workflow to the appropriate states.

create_workflow_run(workflow_run_heartbeat_interval: int | None = None, heartbeat_report_by_buffer: float | None = None) WorkflowRun[source]

Workflow should at least have signalled for a resume at this point.

class client.workflow_run.WorkflowRun(workflow_id: int, requester: jobmon.core.requester.Requester | None = None, workflow_run_heartbeat_interval: int | None = None, heartbeat_report_by_buffer: float | None = None)[source]

Bases: object

WorkflowRun enables tracking for multiple runs of a single Workflow.

A Workflow may be started/paused/ and resumed multiple times. Each start or resume represents a new WorkflowRun.

In order for a Workflow can be deemed to be DONE (successfully), it must have 1 or more WorkflowRuns. In the current implementation, a Workflow Job may belong to one or more WorkflowRuns, but once the Job reaches a DONE state, it will no longer be added to a subsequent WorkflowRun. However, this is not enforced via any database constraints.

workflow_id[source]
user[source]
requester[source]
config[source]
heartbeat_interval[source]
heartbeat_report_by_buffer[source]
_workflow_run_id = None[source]
_status: str | None = None[source]
property workflow_run_id: int[source]
property status: str | None[source]
bind() None[source]

Link this workflow run with the workflow and add all tasks.

_update_status(status: str) None[source]

Update the status of the workflow_run with whatever status is passed.

__repr__() str[source]

A representation string for a client WorkflowRun instance.