mirror of
https://github.com/navidrome/navidrome.git
synced 2026-03-02 05:46:24 -05:00
46 lines
1.8 KiB
YAML
46 lines
1.8 KiB
YAML
version: v1-draft
|
|
exports:
|
|
nd_task_execute:
|
|
description: |-
|
|
OnTaskExecute is called when a queued task is ready to run.
|
|
Return an error to trigger retry (if retries are configured).
|
|
input:
|
|
$ref: '#/components/schemas/TaskExecuteRequest'
|
|
contentType: application/json
|
|
output:
|
|
$ref: '#/components/schemas/TaskExecuteResponse'
|
|
contentType: application/json
|
|
components:
|
|
schemas:
|
|
TaskExecuteRequest:
|
|
description: TaskExecuteRequest is the request provided when a task is ready to execute.
|
|
properties:
|
|
queueName:
|
|
type: string
|
|
description: QueueName is the name of the queue this task belongs to.
|
|
taskId:
|
|
type: string
|
|
description: TaskID is the unique identifier for this task.
|
|
payload:
|
|
type: array
|
|
description: Payload is the opaque data provided when the task was enqueued.
|
|
items:
|
|
type: object
|
|
attempt:
|
|
type: integer
|
|
format: int32
|
|
description: 'Attempt is the current attempt number (1-based: first attempt = 1).'
|
|
required:
|
|
- queueName
|
|
- taskId
|
|
- payload
|
|
- attempt
|
|
TaskExecuteResponse:
|
|
description: TaskExecuteResponse is the response from task execution.
|
|
properties:
|
|
error:
|
|
type: string
|
|
description: |-
|
|
Error, if non-empty, indicates the task failed. The task will be retried
|
|
if retries are configured and attempts remain.
|