server.web.models.workflow_run

Workflow run database table.

Attributes

logger

Classes

WorkflowRun

Database table for recording Workflow Runs.

Module Contents

server.web.models.workflow_run.logger[source]
class server.web.models.workflow_run.WorkflowRun[source]

Bases: jobmon.server.web.models.Base

Database table for recording Workflow Runs.

__tablename__ = 'workflow_run'[source]
to_wire_as_reaper_workflow_run() tuple[source]

Serialize workflow run.

id: sqlalchemy.orm.Mapped[int][source]
workflow_id: sqlalchemy.orm.Mapped[int][source]
user[source]
jobmon_version[source]
jobmon_server_version[source]
status: sqlalchemy.orm.Mapped[str][source]
created_date[source]
status_date[source]
heartbeat_date[source]
workflow[source]
__table_args__[source]
valid_transitions[source]
untimely_transitions[source]
bound_error_states[source]
active_states[source]
property is_alive: bool[source]

Workflow run is in a state that should be registering heartbeats.

property is_active: bool[source]

Statuses where Workflow Run is active (bound or running).

terminable(current_time: datetime.datetime) bool[source]

Whether a workflowrun can be terminated.

A workflowrun can be terminated if it is in Cold/Hot resume state and has missed the last reporting heartbeat.

heartbeat(next_report_increment: float, transition_status: str = WorkflowRunStatus.RUNNING) None[source]

Register a heartbeat for the Workflow Run to show it is still alive.

reap() None[source]

Transition dead workflow runs to a terminal state.

transition(new_state: str) None[source]

Transition the Workflow Run’s state.

hot_reset() None[source]

Set Workflow Run to Hot Resume.

cold_reset() None[source]

Set Workflow Run to Cold Resume.

_validate_transition(new_state: str) None[source]

Ensure the Job state transition is valid.

_is_timely_transition(new_state: str) bool[source]

Check if the transition is invalid due to a race condition.