salvus.flow.acta.registry
salvus.flow.acta.registry salvus flow acta registry Task registration and metadata.
Functions
get_task()
get_task()def get_task(name: str) -> TaskDef: ...Look up a registered task by name.
Parameters
namestr — The task name to look up.
Returns TaskDef
register_task()
register_task()def register_task(task_def: TaskDef) -> None: ...Register task_def under its own name.
Replace existing registrations. Warn if a name is reused for a different function or a nested or lambda function; module-level reloads are silent.
Parameters
task_defTaskDef — The task metadata to register.
Returns None
registered_task_names()
registered_task_names()def registered_task_names() -> frozenset[str]: ...Return every currently registered task name.
Returns frozenset[str]
Classes
TaskDef
TaskDefclass TaskDef(builtins.object):
def __init__(
self,
name: str,
impl_version: int,
tags: tuple[str, ...] = (),
input_ref_names: tuple[str, ...] = (),
input_serializers: Mapping[str, Any] = default,
sequence_inputs: tuple[str, ...] = (),
normalize: Callable[[dict[str, Any]], Mapping[str, Any]] | None = None,
fn: Callable[..., dict[str, object]] | None = None,
spec_model: type[BaseModel] | None = None,
explicit_spec: bool | None = None,
fingerprint: str | None = None,
cache: bool = True,
retention: Retention = Retention.STANDARD,
fingerprint_parts: Mapping[str, str] = default,
) -> None: ...Metadata for a registered task.
Parameters
namestr — Unique task name used for lookup, cache keys, and deployment names.impl_versionint — Implementation version included in the cache key.tagstuple[str, ...] — Placement tags, excluded from cache keys.input_ref_namestuple[str, ...] — Names of arguments represented by content digests.input_serializersMapping[str, Any] — Serializer for each input argument, orNonefor raw artifacts. Empty for manual registrations.sequence_inputstuple[str, ...] — Input names accepting ordered sequences of digests.normalizeCallable[[dict[str, Any]], Mapping[str, Any]] | None — Argument normalizer for cache keys and manifests. Does not change arguments passed to the task body.fnCallable[..., dict[str, object]] | None — Callable using the executor dispatch convention, orNonefor remote-only tasks.spec_modeltype[BaseModel] | None — Parameter model, orNonefor low-level registrations.explicit_specbool | None — Whether the body receives aspecmodel;Nonefor low-level registrations.fingerprintstr | None — Source fingerprint, orNonewhenimplis explicit.cachebool — Whether to memoize results. If false, execution skips locks, records, and manifests; outputs are still stored.retentionRetention — Result lifetime recorded at commit, excluded from cache keys.fingerprint_partsMapping[str, str] — Qualified names and source digests for diagnostics. Empty whenimplis explicit.