httk.workflow.compat.v1¶
Compatibility support for instantiated httk v1 task templates.
Attributes¶
Classes¶
Runner backend which adapts v1 filesystem decisions to v2 outcomes. |
|
A task manager restricted to jobs using the httk v1 runner backend. |
Functions¶
|
Return the packaged compatibility |
|
Map a legacy priority from 1 through 5 onto the v2 range. |
|
Copy an instantiated v1 template and add its immutable v2 job definition. |
|
Prepare and atomically submit one legacy task through a v2 workspace. |
|
Parse a legacy task basename, returning |
Package Contents¶
- httk.workflow.compat.v1.bundled_v1_root() pathlib.Path[source]¶
Return the packaged compatibility
HTTK_DIRroot.
- httk.workflow.compat.v1.legacy_priority(value: int) int[source]¶
Map a legacy priority from 1 through 5 onto the v2 range.
- httk.workflow.compat.v1.prepare_v1_payload(source: str | os.PathLike[str], destination: str | os.PathLike[str], *, materializer: V1Materializer | None = None, instantiate_globals: collections.abc.Mapping[str, object] | None = None, job_id: str | None = None, tag: str = 'v1-task', name: str = 'httk v1 task', initial_step: str = 'start', pool: str = 'default', priority: int = 3, attempts: int = 10, parent: collections.abc.Mapping[str, object] | None = None, root_placement: str | None = None, legacy_link: collections.abc.Mapping[str, object] | None = None) httk.workflow.protocol.JobDefinition[source]¶
Copy an instantiated v1 template and add its immutable v2 job definition.
materializerandinstantiate_globalsare mutually exclusive. The latter executes trusted template code in the current interpreter and does not restore removed v1 Python imports.
- httk.workflow.compat.v1.submit_v1_task(workspace: httk.workflow.Workspace, source: str | os.PathLike[str], placement: str | pathlib.PurePosixPath, *, materializer: V1Materializer | None = None, instantiate_globals: collections.abc.Mapping[str, object] | None = None, job_id: str | None = None, tag: str = 'v1-task', name: str = 'httk v1 task', initial_step: str = 'start', pool: str = 'default', priority: int = 3, attempts: int = 10) httk.workflow.protocol.Marker[source]¶
Prepare and atomically submit one legacy task through a v2 workspace.
- httk.workflow.compat.v1.parse_v1_task_name(value: str) dict[str, str] | None[source]¶
Parse a legacy task basename, returning
Nonewhen it is unrelated.
- class httk.workflow.compat.v1.V1RunnerBackend(*, runtime_root: str | os.PathLike[str] | None = None, timeout: float = 21600.0, wrapper: str | None = None, log_compression: str = 'bzip2', attempts: int = 10)[source]¶
Runner backend which adapts v1 filesystem decisions to v2 outcomes.
- validate(job: httk.workflow.protocol.JobDefinition, payload: pathlib.Path) None[source]¶
- command(launch: httk.workflow.backends.AttemptLaunch) collections.abc.Sequence[str][source]¶
- commit_outcome(commit: httk.workflow.backends.OutcomeCommit) None[source]¶
- reconcile(workspace: httk.workflow.Workspace) None[source]¶
- marker_changed(workspace: httk.workflow.Workspace, marker: httk.workflow.protocol.Marker) None[source]¶
- class httk.workflow.compat.v1.V1TaskManager(workspace: httk.workflow.Workspace, *, taskset: str = 'any', maximum_workers: int = 1, lease_seconds: float | None = None, heartbeat_interval: float = 30.0, unsafe_persistent_takeover: bool = False, runtime_root: str | os.PathLike[str] | None = None, timeout: float = 21600.0, wrapper: str | None = None, log_compression: str = 'bzip2', attempts: int = 10)[source]¶
Bases:
httk.workflow.TaskManagerA task manager restricted to jobs using the httk v1 runner backend.