Skip to content

salvus.flow.acta.executors.local

salvus.flow.acta.executors.local salvus flow acta executors local

Execute registered tasks in local threads.

Each task uses the executor’s content store. Errors propagate without retries. An optional concurrency limit bounds active task bodies; Acta waits release capacity for nested tasks.

Classes

LocalExecutor

class LocalExecutor(builtins.object):
    def __init__(
        self, store: ContentStoreBase, max_concurrent_tasks: int | None = None
    ) -> None: ...

Execute registered tasks in local threads.

Parameters
  • store ContentStoreBase — Content store for task inputs and outputs.
  • max_concurrent_tasks int | None = None — Positive limit on active task bodies across all callers. Suspended parents do not count. None uses the event loop’s default thread pool. Configured workers retire when idle. Cancellation waits for running task threads to finish.
Attributes
max_concurrent_tasks int | None

Return the immutable active-task limit, or None for default pools.

Methods
execute()
def execute(self, request: TaskRequest) -> TaskResult: ...

Run the registered callable for request.task_name.

An unknown task name raises KeyError.

Parameters
  • request TaskRequest — The task to run.
Returns TaskResult