OAPI: Restartable workers

Extend the data model so that Workers can mark themselves as 'restartable'
at sign-on.
This commit is contained in:
Sybren A. Stüvel 2023-08-12 05:37:52 +02:00
parent 9009b60379
commit 7cfc2aa9e7

@ -1513,7 +1513,7 @@ components:
WorkerStatus: WorkerStatus:
type: string type: string
enum: [starting, awake, asleep, error, testing, offline] enum: [starting, awake, asleep, error, testing, offline, restart]
WorkerSignOn: WorkerSignOn:
type: object type: object
@ -1523,12 +1523,14 @@ components:
type: array type: array
items: { type: string } items: { type: string }
software_version: { type: string } software_version: { type: string }
can_restart: { type: boolean }
required: [name, supported_task_types, software_version] required: [name, supported_task_types, software_version]
example: example:
# This example may be nice to use from the SwaggerUI interface. # This example may be nice to use from the SwaggerUI interface.
name: API user name: API user
supported_task_types: [blender, ffmpeg, file-management, misc] supported_task_types: [blender, ffmpeg, file-management, misc]
software_version: swagger-ui software_version: swagger-ui
can_restart: false
WorkerStateChange: WorkerStateChange:
type: object type: object
@ -2313,7 +2315,10 @@ components:
type: string type: string
format: date-time format: date-time
description: This is only set when the worker was deleted. description: This is only set when the worker was deleted.
required: [id, name, updated, status, version] "can_restart":
type: boolean
description: Whether this Worker can auto-restart.
required: [id, name, updated, status, version, can_restart]
SocketIOSubscription: SocketIOSubscription:
type: object type: object
@ -2373,7 +2378,10 @@ components:
"version": "version":
type: string type: string
description: Version of Flamenco this Worker is running description: Version of Flamenco this Worker is running
required: [id, name, status, version] "can_restart":
type: boolean
description: Whether this worker can auto-restart.
required: [id, name, status, version, can_restart]
Worker: Worker:
description: All information about a Worker description: All information about a Worker