get_job
Read and monitor a script or capture-sweep job: check state, runtime, recent output, final result, or error, and optionally wait for it to finish or change state.
Instructions
Read a job run_script_job or capture_sweep started: its state, how long it has run, its last line and the lines it printed since the last read; once it has ended, its result, or its error and traceback, and what it printed, each stream's last 200 lines. A sweep's result is one line: its folder, and the shots that came out black or failed; its message says which shot it is on, and its last line, whatever its end, says what it took.
States: working; cancelling, while its cleanup runs after a cancel; completed; failed; cancelled. With wait, the call returns when the job ends or changes state, or after that many seconds, so a long job is waited for without a call every few seconds. With no job_id it reads the running job or the last one, so a job is found again after the conversation was compacted. Reading changes nothing in Kit.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wait | No | Seconds to wait for the job to end or change state, at most 100; new lines don't end it, and other calls through this server wait meanwhile | |
| job_id | No | The id run_script_job or capture_sweep answered, such as j3; the running or last job when empty |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |