Skip to main content

TaskResponse

attemptsinteger<int32>required

Number of execution attempts

Example: 0
book_idstring,null<uuid>nullable

Associated book ID (if applicable)

completed_atstring,null<date-time>nullable

When task execution completed

created_atstring<date-time>required

When the task was created

Example: 2024-01-15T10:00:00Z
idstring<uuid>required

Unique task identifier

Example: 550e8400-e29b-41d4-a716-446655440000
last_errorstring | nullnullable

Error message from last failed attempt

library_idstring,null<uuid>nullable

Associated library ID (if applicable)

Example: 550e8400-e29b-41d4-a716-446655440001
locked_bystring | nullnullable

Worker ID that has locked this task

Example: worker-1
locked_untilstring,null<date-time>nullable

When the lock expires

max_attemptsinteger<int32>required

Maximum number of allowed attempts

Example: 3
params

Task-specific parameters

priorityinteger<int32>required

Priority level (higher = more urgent)

Example: 0
result

Task execution result

scheduled_forstring<date-time>required

When the task is scheduled to run

Example: 2024-01-15T12:00:00Z
series_idstring,null<uuid>nullable

Associated series ID (if applicable)

started_atstring,null<date-time>nullable

When task execution started

statusstringrequired

Current status (pending, processing, completed, failed)

Example: pending
task_typestringrequired

Type of task (scan_library, generate_thumbnail, etc.)

Example: scan_library
TaskResponse
{
"attempts": 0,
"book_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"completed_at": "2024-07-29T15:51:28.071Z",
"created_at": "2024-01-15T10:00:00Z",
"id": "550e8400-e29b-41d4-a716-446655440000",
"last_error": "string",
"library_id": "550e8400-e29b-41d4-a716-446655440001",
"locked_by": "worker-1",
"locked_until": "2024-07-29T15:51:28.071Z",
"max_attempts": 3,
"priority": 0,
"scheduled_for": "2024-01-15T12:00:00Z",
"series_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"started_at": "2024-07-29T15:51:28.071Z",
"status": "pending",
"task_type": "scan_library"
}