Skip to main content

Jobs and workers

RouteWhat it does
GET /jobs?versionId=&status=Jobs, filtered
GET /jobs/:idA job with its log and error
GET /versions/:id/jobsThe jobs of a draft or version
POST /jobs/:id/retryRun a failed job again

The worker's side​

You only need this to write a worker of your own.

RouteWhat it does
POST /jobs/claim{ workerId, types?, environment? }: hands out the oldest waiting job, to exactly one worker, or nothing
GET /jobs/:id/contextWhat the job needs: the document, the version, the files with their SHA-256, for a run its parameters
POST /jobs/:id/heartbeat"Still on it." A job without heartbeats goes back to the queue
POST /jobs/:id/completeDone, with log lines
POST /jobs/:id/failFailed, with the error. final: true when trying again can't help

Results are uploaded as files of the job's version, with X-Generator and X-Input-Sha256 saying what made them from what. A result for a source that has changed since is refused.