perago.WorkerRuntime#
- class perago.WorkerRuntime(worker_id, log_file, swept_workspaces)[源代码]#
Prepared identity and logging state for one worker process.
WorkerRuntimeis returned after a child process has resolved its worker id and installed the per-worker JSONL log sink. It is runtime-local state and is not serialized into Conductor task input, task output, or generated TaskDefs.- Parameters:
- worker_idstr
Stable worker id for the current process. Supervisor-managed children receive this value from
PERAGO_WORKER_ID.- log_filepathlib.Path
JSONL log file configured for this process.
- swept_workspaceslist of pathlib.Path
Reserved for compatibility; worker startup no longer sweeps global workspace directories.
- Attributes:
- worker_idstr
Stable worker id for the current process.
- log_filepathlib.Path
JSONL log file configured for this process.
- swept_workspaceslist of pathlib.Path
Reserved for compatibility; worker startup no longer sweeps global workspace directories.
- 参数:
参见
prepare_worker_runtimeBuild this value for a worker child process.
RuntimeConfigLocal roots and logging policy used to prepare the worker.
Notes
The dataclass is frozen. Sweeping only removes directories containing Perago's attempt workspace marker under
RuntimeConfig.workspace_root.Examples
>>> WorkerRuntime( ... worker_id="featuresBuild0001", ... log_file=Path("/tmp/perago/logs/worker.jsonl"), ... swept_workspaces=[], ... ).worker_id 'featuresBuild0001'
- __init__(worker_id, log_file, swept_workspaces)#
Methods
__init__(worker_id, log_file, swept_workspaces)Attributes
worker_idlog_fileswept_workspaces