job_control
job_control
¶
Job lifecycle control service — conductor-only proxy.
Every operation routes through the conductor via DaemonClient IPC.
If the conductor is not running, all operations fail with clear errors.
There is no subprocess fallback.
Classes¶
JobStartResult
dataclass
¶
Result of starting a job.
JobActionResult
dataclass
¶
Result of a job action (pause/resume/cancel).
ProcessHealth
dataclass
¶
ProcessHealth(pid, is_alive, is_zombie_state, process_exists, cpu_percent=None, memory_mb=None, uptime_seconds=None)
Process health check result (derived from conductor state).
JobControlService
¶
Conductor-only proxy for job lifecycle control.
Parameters¶
daemon_client:
A DaemonClient connected to the conductor's Unix socket.
Source code in src/marianne/dashboard/services/job_control.py
Methods:¶
start_job
async
¶
start_job(config_path=None, config_content=None, workspace=None, start_sheet=1, self_healing=False, fresh=False, self_healing_auto_confirm=False, escalation=False, dry_run=False, chain_depth=None, client_cwd=None, runtime_variables=None)
Submit a new job to the conductor.
The conductor contract is path-based and asynchronous: accepted
jobs keep the submitted path in the registry and may read it after
this request returns. Inline config_content is therefore written
to a durable dashboard submissions directory, not a throwaway temp file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config_path
|
Path | None
|
Path to YAML config file. |
None
|
config_content
|
str | None
|
Inline YAML config content (written to durable file). |
None
|
workspace
|
Path | None
|
Override workspace directory. |
None
|
start_sheet
|
int
|
Starting sheet number. |
1
|
self_healing
|
bool
|
Enable self-healing mode. |
False
|
fresh
|
bool
|
Start with clean state, ignoring existing checkpoints. |
False
|
self_healing_auto_confirm
|
bool
|
Auto-confirm self-healing fixes. |
False
|
escalation
|
bool
|
Pause for composer decision on retry exhaustion. |
False
|
dry_run
|
bool
|
Forward dry-run intent to daemon clients that honor it. |
False
|
chain_depth
|
int | None
|
Concert chain depth for chained submissions. |
None
|
client_cwd
|
Path | None
|
Client working directory for relative path resolution. |
None
|
runtime_variables
|
dict[str, str] | None
|
Per-invocation template variables. |
None
|
Returns:
| Type | Description |
|---|---|
JobStartResult
|
JobStartResult with job details. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If neither config_path nor config_content provided. |
FileNotFoundError
|
If config_path doesn't exist. |
RuntimeError
|
If the conductor rejects the submission. |
Source code in src/marianne/dashboard/services/job_control.py
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 | |
pause_job
async
¶
Pause a running job via the conductor.
Source code in src/marianne/dashboard/services/job_control.py
resume_job
async
¶
Resume a paused job via the conductor.
Source code in src/marianne/dashboard/services/job_control.py
cancel_job
async
¶
Cancel a running or paused job via the conductor.
Source code in src/marianne/dashboard/services/job_control.py
delete_job
async
¶
Delete a terminal job from the conductor registry.
Source code in src/marianne/dashboard/services/job_control.py
verify_process_health
async
¶
Check job health by querying conductor state.
Returns a ProcessHealth derived from the job's CheckpointState
as reported by the conductor.