Update README.md

This commit is contained in:
2023-06-04 22:08:09 +02:00
committed by GitHub
parent 3960b5f79f
commit 3fc9ec53c0

View File

@@ -1,5 +1,5 @@
# Render Job Server ![jose-banner](https://github.com/JanGross/toho-jose/assets/13641301/dd27779f-cab7-4274-b7ea-d125327ff991)
## Render-Job server for Toho-Miku
## Endpoints: ## Endpoints:
- [GET] / - [GET] /
- Returns a string "Job handling server" - Returns a string "Job handling server"
@@ -7,8 +7,3 @@
- Returns a JSON object containing a count and items for the `queued`, `waiting`, and `finished` jobs. - Returns a JSON object containing a count and items for the `queued`, `waiting`, and `finished` jobs.
- [POST] /jobs - [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 `queued` jobs object. The generated job ID and a status code of `200` are 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 `queued` jobs object. The generated job ID and a status code of `200` are returned in the response.
- [GET] /batch
- Returns a JSON object containing a count and items for jobs from the `queued` object in the amount specified in the `size` query parameter, or the amount of items in the `queued` object, whichever is smaller.
The returned jobs are added to the `waiting` jobs object and removed from the `queued` jobs object.
- [POST] /jobs/:jobId/completed
- Accepts a jobId in the path parameter, marks it as completed and moves it from waiting to finished.