You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit adds a `wait_for_job` method which will repeatedly poll
a job's status until that job is finished.
Internally, it uses an exponential backoff for the polling intervals.
That way, it is snappy for fast-running jobs without putting too
much load on the server for long-running jobs.
It returns the successfully finished `JobItem` object which might be
of interest to the caller, e.g. to inspect the reported `started_at`
`finished_at` times or the `notes`.
For failed jobs, `wait_for_job` raises an exception. That way, we
ensure that errors in jobs don't accidentally go unnoticed. The
`jobs` object can still be retrieved from the exception object, if
required.
0 commit comments