OAPI: add farm status service

Add an OpenAPI operation to fetch the overall farm status from the Manager.
This commit is contained in:
Sybren A. Stüvel 2024-02-29 20:27:44 +01:00
parent 94bf65a9e3
commit 0c7bf3bf3b

@ -191,6 +191,20 @@ paths:
application/json:
schema: { $ref: "#/components/schemas/SharedStorageLocation" }
/api/v3/status:
summary: Report the status of the Flamenco farm.
get:
summary: Get the status of this Flamenco farm.
operationId: getFarmStatus
tags: [meta]
responses:
"200":
description: normal response
content:
application/json:
schema:
$ref: "#/components/schemas/FarmStatusReport"
## Worker
/api/v3/worker/register-worker:
@ -1384,6 +1398,26 @@ components:
name: Your Manager
git: v3.2-76-gdd34d538
FarmStatusReport:
type: object
properties:
"status":
$ref: "#/components/schemas/FarmStatus"
required: [status]
example:
status: idle
FarmStatus:
type: string
enum:
- "active" # Actively working on jobs.
- "idle" # Farm could be active, but has no work to do.
- "waiting" # Work has been queued, but all workers are asleep.
- "asleep" # Farm is idle, and all workers are asleep.
- "inoperative" # Cannot work: no workers, or all are offline/error.
- "unknown" # Unexpected configuration of worker and job statuses.
- "starting" # Farm is starting up.
ManagerConfiguration:
type: object
properties: