8b73df366007f09011b5a144b88ebbb9eca11fd0
Render Job Server
Endpoints:
- [GET] /
- Returns a string "Job handling server"
- [GET] /jobs
- Returns a JSON object containing a count and items for the
queued,waiting, andfinishedjobs.
- Returns a JSON object containing a count and items for the
- [POST] /jobs
- Accepts a JSON object in the request body, generates a unique job ID using an MD5 hash, and adds the job to the
queuedjobs object. The generated job ID and a status code of200are returned in the response.
- Accepts a JSON object in the request body, generates a unique job ID using an MD5 hash, and adds the job to the
- [GET] /batch
- Returns a JSON object containing a count and items for jobs from the
queuedobject in the amount specified in thesizequery parameter, or the amount of items in thequeuedobject, whichever is smaller.
The returned jobs are added to thewaitingjobs object and removed from thequeuedjobs object.
- Returns a JSON object containing a count and items for jobs from the
- [POST] /jobs/:jobId/completed
- Accepts a jobId in the path parameter, marks it as completed and moves it from waiting to finished.
Description
Languages
JavaScript
100%