TaskResponse
attemptsinteger<int32>required
Number of execution attempts
Example:
0bookIdstring,null<uuid>nullable
Associated book ID (if applicable)
completedAtstring,null<date-time>nullable
When task execution completed
createdAtstring<date-time>required
When the task was created
Example:
2024-01-15T10:00:00Zidstring<uuid>required
Unique task identifier
Example:
550e8400-e29b-41d4-a716-446655440000lastErrorstring | nullnullable
Error message from last failed attempt
libraryIdstring,null<uuid>nullable
Associated library ID (if applicable)
Example:
550e8400-e29b-41d4-a716-446655440001lockedBystring | nullnullable
Worker ID that has locked this task
Example:
worker-1lockedUntilstring,null<date-time>nullable
When the lock expires
maxAttemptsinteger<int32>required
Maximum number of allowed attempts
Example:
3params
Task-specific parameters
priorityinteger<int32>required
Priority level (higher = more urgent)
Example:
0result
Task execution result
scheduledForstring<date-time>required
When the task is scheduled to run
Example:
2024-01-15T12:00:00ZseriesIdstring,null<uuid>nullable
Associated series ID (if applicable)
startedAtstring,null<date-time>nullable
When task execution started
statusstringrequired
Current status (pending, processing, completed, failed)
Example:
pendingtaskTypestringrequired
Type of task (scan_library, generate_thumbnail, etc.)
Example:
scan_libraryTaskResponse
{
"attempts": 0,
"bookId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"completedAt": "2024-07-29T15:51:28.071Z",
"createdAt": "2024-01-15T10:00:00Z",
"id": "550e8400-e29b-41d4-a716-446655440000",
"lastError": "string",
"libraryId": "550e8400-e29b-41d4-a716-446655440001",
"lockedBy": "worker-1",
"lockedUntil": "2024-07-29T15:51:28.071Z",
"maxAttempts": 3,
"priority": 0,
"scheduledFor": "2024-01-15T12:00:00Z",
"seriesId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"startedAt": "2024-07-29T15:51:28.071Z",
"status": "pending",
"taskType": "scan_library"
}