WIP: 103268-job-task-progress #104185

Draft
Nitin-Rawat-1 wants to merge 19 commits from Nitin-Rawat-1/flamenco:103268-job-task-progress into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
1 changed files with 45 additions and 0 deletions
Showing only changes of commit 7a1ae6928a - Show all commits

View File

@ -454,6 +454,37 @@ paths:
schema:
$ref: "#/components/schemas/Error"
/api/v3/worker/task/{task_id}/progress:
summary: Workers send the progress of the task, in the form of integer percentage value here.
post:
operationId: taskProgressUpdate
summary: Update the progress of the task.
security: [{ worker_auth: [] }]
tags: [worker]
parameters:
- name: task_id
in: path
required: true
schema: { type: string, format: uuid }
requestBody:
description: Task progress information
required: true
content:
applicaton/json:
schema:
$ref: "#/components/schemas/TaskProgressUpdate"
responses:
"204":
description: The progress update was accepted
"409":
description: The task is assigned to another worker, so the progress update was not accepted.
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
# Worker Management
/api/v3/worker-mgt/workers:
summary: Obtain list of Workers known to the Manager.
@ -1463,6 +1494,20 @@ components:
type: string
description: Log lines for this task, will be appended to logs sent earlier.
TaskProgressUpdate:
type: object
description: >
TaskProgressUpdate is sent by a Worker to update the progress of a task
it's executing.
properties:
"progress":
type: integer
minimum: 0
maximum: 100
description: >
Indicates the percentage of the task that's been completed.
required: ["progress"]
MayKeepRunning:
type: object
description: Indicates whether the worker may keep running the task.