workflow

Reference for `workflow`.

workflow reference.

Methods

resume(self, execution_id: 'str', input: 'Any' = None) -> 'ExecutionContext'

Resume a paused workflow with the given execution ID and optional input.

Args: execution_id (str): The ID of the workflow execution to resume. input (Any, optional): Input to provide when resuming the workflow. Defaults to None.

Returns: ExecutionContext: The updated execution context after resuming the workflow.

run(self, *args, **kwargs) -> 'ExecutionContext'

No docstring.

with_options(name: 'str | None' = None, namespace: 'str | None' = None, secret_requests: 'list[str] | None' = None, output_storage: 'OutputStorage | None' = None, requests: 'ResourceRequest | None' = None, affinity: 'dict[str, str] | None' = None, schedule: 'Schedule | None' = None, durability: 'str' = 'durable', runner: 'str | None' = None, routing: 'dict | None' = None) -> 'Callable[[F], workflow]'

A decorator to configure options for a workflow function.

Args: name (str | None, optional): The name of the workflow. Defaults to None. namespace (str | None, optional): The namespace for the workflow. Defaults to “default”. secret_requests (list[str], optional): A list of secret keys required by the workflow. Defaults to an empty list. output_storage (OutputStorage | None, optional): The storage configuration for the workflow’s output. Defaults to None. requests (ResourceRequest | None, optional): The minimum resources, runtime and packages for the workflow. Defaults to None. affinity (dict[str, str] | None, optional): Label-based worker affinity constraints. Workers must have all specified labels to run this workflow. Defaults to None. schedule (Schedule | None, optional): The schedule configuration for automatic workflow execution. Defaults to None. durability (str, optional): “durable” (default) persists every task-level checkpoint; “transient” keeps only the outer lifecycle. runner (str | None, optional): Runner this workflow requires on the worker (“inprocess”, “subprocess”, or “docker”). Defaults to None, meaning the worker’s configured default_runner. routing (dict | None, optional): Scoring policy built with flux.routing.score(...) that ranks eligible workers at dispatch (event mode only). Hard constraints (requests/affinity/runner) still filter first. Defaults to None (least-loaded).

Returns: Callable[[F], workflow]: A decorator that wraps the given function into a workflow object with the specified options.


Generated from flux/workflow. Last verified against Flux 0.56.0.