OAPI: add operation & SocketIO subscription for global last-rendered img

Add an operation to get the last-rendered image from whatever job received
such output from a Worker, and add a SocketIO subscription type to receive
updates about all jobs' last-rendered images.

These are necessary for a global last-rendered image display.
This commit is contained in:
Sybren A. Stüvel 2022-07-01 12:31:18 +02:00
parent f5f63455d6
commit 60f3f5482d

View File

@ -484,6 +484,21 @@ paths:
"204": "204":
description: This job doesn't have any last-rendered image. description: This job doesn't have any last-rendered image.
/api/jobs/last-rendered:
summary: Obtain info about the global last-rendered image.
get:
operationId: fetchGlobalLastRenderedInfo
summary: Get the URL that serves the last-rendered images.
tags: [jobs]
responses:
"200":
description: Normal response.
content:
application/json:
schema: { $ref: "#/components/schemas/JobLastRenderedImageInfo" }
"204":
description: This job doesn't have any last-rendered image.
/api/jobs/{job_id}/setstatus: /api/jobs/{job_id}/setstatus:
summary: Request a status change for the given job. summary: Request a status change for the given job.
post: post:
@ -1583,7 +1598,7 @@ components:
SocketIOSubscriptionType: SocketIOSubscriptionType:
type: string type: string
enum: [allJobs, allWorkers, job, tasklog] enum: [allJobs, allWorkers, job, tasklog, allLastRendered]
description: What kind of thing to subscribe to / unsubscribe from. description: What kind of thing to subscribe to / unsubscribe from.
# Worker Management # Worker Management