WIP: 103268-job-task-progress #104185
@ -454,6 +454,37 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/Error"
|
$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
|
# Worker Management
|
||||||
/api/v3/worker-mgt/workers:
|
/api/v3/worker-mgt/workers:
|
||||||
summary: Obtain list of Workers known to the Manager.
|
summary: Obtain list of Workers known to the Manager.
|
||||||
@ -1463,6 +1494,20 @@ components:
|
|||||||
type: string
|
type: string
|
||||||
description: Log lines for this task, will be appended to logs sent earlier.
|
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:
|
MayKeepRunning:
|
||||||
type: object
|
type: object
|
||||||
description: Indicates whether the worker may keep running the task.
|
description: Indicates whether the worker may keep running the task.
|
||||||
|
Loading…
Reference in New Issue
Block a user