server.web.models.workflow_run ============================== .. py:module:: server.web.models.workflow_run .. autoapi-nested-parse:: Workflow run database table. Attributes ---------- .. autoapisummary:: server.web.models.workflow_run.logger Classes ------- .. autoapisummary:: server.web.models.workflow_run.WorkflowRun Module Contents --------------- .. py:data:: logger .. py:class:: WorkflowRun Bases: :py:obj:`jobmon.server.web.models.Base` Database table for recording Workflow Runs. .. py:method:: to_wire_as_reaper_workflow_run() -> tuple Serialize workflow run. .. py:attribute:: id :type: sqlalchemy.orm.Mapped[int] .. py:attribute:: workflow_id :type: sqlalchemy.orm.Mapped[int] .. py:attribute:: user .. py:attribute:: jobmon_version .. py:attribute:: jobmon_server_version .. py:attribute:: status :type: sqlalchemy.orm.Mapped[str] .. py:attribute:: created_date .. py:attribute:: status_date .. py:attribute:: heartbeat_date .. py:attribute:: workflow .. py:attribute:: valid_transitions .. py:attribute:: untimely_transitions .. py:attribute:: bound_error_states .. py:attribute:: active_states .. py:property:: is_alive :type: bool Workflow run is in a state that should be registering heartbeats. .. py:property:: is_active :type: bool Statuses where Workflow Run is active (bound or running). .. py:method:: terminable(current_time: datetime.datetime) -> bool 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. .. py:method:: heartbeat(next_report_increment: float, dialect: str, transition_status: str = WorkflowRunStatus.RUNNING) -> None Register a heartbeat for the Workflow Run to show it is still alive. :param next_report_increment: Number of seconds until next expected heartbeat :param dialect: The database dialect (mysql, sqlite) :param transition_status: The status to transition to .. py:method:: reap() -> None Transition dead workflow runs to a terminal state. .. py:method:: transition(new_state: str) -> None Transition the Workflow Run's state. .. py:method:: hot_reset() -> None Set Workflow Run to Hot Resume. .. py:method:: cold_reset() -> None Set Workflow Run to Cold Resume.