server.web.routes.v3.fsm.array

Routes for Arrays.

Attributes

logger

Functions

add_array() → Any)

Return an array ID by workflow and task template version ID.

record_array_batch_num() → Any)

Record a batch number to associate sets of task instances with an array submission.

transition_array_to_launched() → Any)

Transition TIs associated with an array_id and batch_num to launched.

transition_to_killed() → Any)

Transition TIs from KILL_SELF to ERROR_FATAL.

log_array_distributor_id() → Any)

Add distributor_id, stderr/stdout paths to the DB for all TIs in an array.

get_array_max_concurrently_running() → Any)

Return the maximum concurrency of this array.

Module Contents

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

Return an array ID by workflow and task template version ID.

If not found, bind the array.

async server.web.routes.v3.fsm.array.record_array_batch_num(array_id: int, request: fastapi.Request, db: sqlalchemy.orm.Session = Depends(get_db)) Any

Record a batch number to associate sets of task instances with an array submission.

async server.web.routes.v3.fsm.array.transition_array_to_launched(array_id: int, request: fastapi.Request, db: sqlalchemy.orm.Session = Depends(get_db)) Any

Transition TIs associated with an array_id and batch_num to launched.

async server.web.routes.v3.fsm.array.transition_to_killed(array_id: int, request: fastapi.Request, db: sqlalchemy.orm.Session = Depends(get_db)) Any

Transition TIs from KILL_SELF to ERROR_FATAL.

Also marks parent Tasks as ERROR_FATAL if they’re in a killable state. This is safe because the workflow won’t be resumable until all KILL_SELF TIs are cleaned up (no race condition with new workflow runs).

async server.web.routes.v3.fsm.array.log_array_distributor_id(array_id: int, request: fastapi.Request, db: sqlalchemy.orm.Session = Depends(get_db)) Any

Add distributor_id, stderr/stdout paths to the DB for all TIs in an array.

async server.web.routes.v3.fsm.array.get_array_max_concurrently_running(array_id: int | None = None, workflow_id: int | None = None, task_template_version_id: int | None = None, db: sqlalchemy.orm.Session = Depends(get_db)) Any

Return the maximum concurrency of this array.