server.web.routes.v2.fsm.array

Routes for Arrays.

Attributes

logger

SessionMaker

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.

_update_task_instance(→ None)

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.

transition_to_killed(→ Any)

Transition TIs from KILL_SELF to ERROR_FATAL.

_update_task_instance_killed(→ None)

Bulk update TaskInstances in (array_id, batch_num) from KILL_SELF.

Module Contents

server.web.routes.v2.fsm.array.logger[source]
server.web.routes.v2.fsm.array.SessionMaker[source]
async server.web.routes.v2.fsm.array.add_array(request: fastapi.Request) Any[source]

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

If not found, bind the array.

async server.web.routes.v2.fsm.array.record_array_batch_num(array_id: int, request: fastapi.Request) Any[source]

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

async server.web.routes.v2.fsm.array.transition_array_to_launched(array_id: int, request: fastapi.Request) Any[source]

Transition TIs associated with an array_id and batch_num to launched.

server.web.routes.v2.fsm.array._update_task_instance(array_id: int, batch_num: int, next_report: int) None[source]
async server.web.routes.v2.fsm.array.log_array_distributor_id(array_id: int, request: fastapi.Request) Any[source]

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

async server.web.routes.v2.fsm.array.get_array_max_concurrently_running(array_id: int | None = None, workflow_id: int | None = None, task_template_version_id: int | None = None) Any[source]

Return the maximum concurrency of this array.

async server.web.routes.v2.fsm.array.transition_to_killed(array_id: int, request: fastapi.Request) Any[source]

Transition TIs from KILL_SELF to ERROR_FATAL.

Also mark parent Tasks with status=ERROR_FATAL if they’re in a killable state.

server.web.routes.v2.fsm.array._update_task_instance_killed(array_id: int, batch_num: int) None[source]

Bulk update TaskInstances in (array_id, batch_num) from KILL_SELF.