From 60f3f5482d145760a465950fe9361d36d5a667ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Fri, 1 Jul 2022 12:31:18 +0200 Subject: [PATCH] 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. --- pkg/api/flamenco-openapi.yaml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/pkg/api/flamenco-openapi.yaml b/pkg/api/flamenco-openapi.yaml index f9f96d23..2b5326f7 100644 --- a/pkg/api/flamenco-openapi.yaml +++ b/pkg/api/flamenco-openapi.yaml @@ -484,6 +484,21 @@ paths: "204": 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: summary: Request a status change for the given job. post: @@ -1583,7 +1598,7 @@ components: SocketIOSubscriptionType: type: string - enum: [allJobs, allWorkers, job, tasklog] + enum: [allJobs, allWorkers, job, tasklog, allLastRendered] description: What kind of thing to subscribe to / unsubscribe from. # Worker Management