From 6efd5144dae8240575191e3371e04add75e479b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Sat, 9 Nov 2024 22:19:40 +0100 Subject: [PATCH] OAPI: Add 'index in job' field to tasks Give tasks a new field, explicitly storing the creation order of the tasks in the job. This makes it possible for the web interface to show the tasks in a stable order, without jumping around when they update. --- pkg/api/flamenco-openapi.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/api/flamenco-openapi.yaml b/pkg/api/flamenco-openapi.yaml index b6ba8f6f..1f145888 100644 --- a/pkg/api/flamenco-openapi.yaml +++ b/pkg/api/flamenco-openapi.yaml @@ -2013,6 +2013,7 @@ components: format: date-time description: Timestamp of last update. "job_id": { type: string, format: uuid } + "index_in_job": { type: integer } "name": { type: string } "status": { $ref: "#/components/schemas/TaskStatus" } "priority": { type: integer } @@ -2034,6 +2035,7 @@ components: - created - updated - job_id + - index_in_job - name - status - priority @@ -2066,10 +2068,11 @@ components: id: { type: string, format: uuid } name: { type: string } status: { $ref: "#/components/schemas/TaskStatus" } + index_in_job: { type: integer } priority: { type: integer } task_type: { type: string } updated: { type: string, format: date-time } - required: [id, name, status, priority, task_type, updated] + required: [id, name, status, index_in_job, priority, task_type, updated] TaskLogInfo: type: object