By default, the Python API client will poll for job status every 15 seconds, and it will give up if the job hasn't completed after 90 seconds (after 6 polls to /jobs/{job_id}). A user can also interrupt the process at any time by pressing Ctrl-C.
However, the sandbox node has no way of knowing that the client is no longer interested in the result of the job, so it will (eventually) complete the job anyway, wasting compute and storage resources.
To reduce load on the system, I'd like to have the Python API client attempt to cancel the job if it decides that it's not going to wait for the job to complete, e.g., by sending a DELETE request to /jobs/{job_id}.
By default, the Python API client will poll for job status every 15 seconds, and it will give up if the job hasn't completed after 90 seconds (after 6 polls to
/jobs/{job_id}
). A user can also interrupt the process at any time by pressing Ctrl-C.However, the sandbox node has no way of knowing that the client is no longer interested in the result of the job, so it will (eventually) complete the job anyway, wasting compute and storage resources.
To reduce load on the system, I'd like to have the Python API client attempt to cancel the job if it decides that it's not going to wait for the job to complete, e.g., by sending a
DELETE
request to/jobs/{job_id}
.