server.web.routes.v3.fsm.workflow_run

Routes for WorkflowRuns.

Attributes

logger

Functions

add_workflow_run() → Any)

Add a workflow run to the db.

terminate_workflow_run() → Any)

Terminate task instances for a workflow run being resumed.

log_workflow_run_heartbeat() → Any)

Log a heartbeat for the workflow run to show that the client side is still alive.

log_workflow_run_status_update() → Any)

Update the status of the workflow run.

task_instances_status_check() → Any)

Sync status of given task intance IDs.

set_status_for_triaging() → Any)

Two triaging related status sets with improved deadlock prevention.

Module Contents

server.web.routes.v3.fsm.workflow_run.logger
async server.web.routes.v3.fsm.workflow_run.add_workflow_run(request: fastapi.Request, db: sqlalchemy.orm.Session = Depends(get_db)) Any

Add a workflow run to the db.

async server.web.routes.v3.fsm.workflow_run.terminate_workflow_run(workflow_run_id: int, request: fastapi.Request, db: sqlalchemy.orm.Session = Depends(get_db)) Any

Terminate task instances for a workflow run being resumed.

  • QUEUED/INSTANTIATED: Set directly to ERROR_FATAL (no worker exists to clean up)

  • LAUNCHED/RUNNING: Set to KILL_SELF (worker will detect and clean up)

  • HOT_RESUME: Preserve RUNNING tasks (let them finish)

  • COLD_RESUME: Kill everything including RUNNING tasks

async server.web.routes.v3.fsm.workflow_run.log_workflow_run_heartbeat(workflow_run_id: int, request: fastapi.Request, db: sqlalchemy.orm.Session = Depends(get_db)) Any

Log a heartbeat for the workflow run to show that the client side is still alive.

async server.web.routes.v3.fsm.workflow_run.log_workflow_run_status_update(workflow_run_id: int, request: fastapi.Request, db: sqlalchemy.orm.Session = Depends(get_db)) Any

Update the status of the workflow run.

async server.web.routes.v3.fsm.workflow_run.task_instances_status_check(workflow_run_id: int, request: fastapi.Request, db: sqlalchemy.orm.Session = Depends(get_db)) Any

Sync status of given task intance IDs.

async server.web.routes.v3.fsm.workflow_run.set_status_for_triaging(workflow_run_id: int, request: fastapi.Request, db: sqlalchemy.orm.Session = Depends(get_db)) Any

Two triaging related status sets with improved deadlock prevention.

Query all task instances that are submitted to distributor or running which haven’t reported as alive in the allocated time, and set them for Triaging(from Running) and NO_HEARTBEAT(from Launched).