mirror of
https://github.com/immich-app/immich.git
synced 2025-12-12 07:41:02 -08:00
refactor: job vs queue naming (#23902)
This commit is contained in:
@@ -4836,14 +4836,14 @@
|
||||
"/jobs": {
|
||||
"get": {
|
||||
"description": "Retrieve the counts of the current queue, as well as the current status.",
|
||||
"operationId": "getAllJobsStatus",
|
||||
"operationId": "getQueuesLegacy",
|
||||
"parameters": [],
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/AllJobStatusResponseDto"
|
||||
"$ref": "#/components/schemas/QueuesResponseDto"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -4936,17 +4936,17 @@
|
||||
"x-immich-state": "Stable"
|
||||
}
|
||||
},
|
||||
"/jobs/{id}": {
|
||||
"/jobs/{name}": {
|
||||
"put": {
|
||||
"description": "Queue all assets for a specific job type. Defaults to only queueing assets that have not yet been processed, but the force command can be used to re-process all assets.",
|
||||
"operationId": "sendJobCommand",
|
||||
"operationId": "runQueueCommandLegacy",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
"name": "name",
|
||||
"required": true,
|
||||
"in": "path",
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/JobName"
|
||||
"$ref": "#/components/schemas/QueueName"
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -4954,7 +4954,7 @@
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/JobCommandDto"
|
||||
"$ref": "#/components/schemas/QueueCommandDto"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -4965,7 +4965,7 @@
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/JobStatusDto"
|
||||
"$ref": "#/components/schemas/QueueResponseDto"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -14084,77 +14084,6 @@
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"AllJobStatusResponseDto": {
|
||||
"properties": {
|
||||
"backgroundTask": {
|
||||
"$ref": "#/components/schemas/JobStatusDto"
|
||||
},
|
||||
"backupDatabase": {
|
||||
"$ref": "#/components/schemas/JobStatusDto"
|
||||
},
|
||||
"duplicateDetection": {
|
||||
"$ref": "#/components/schemas/JobStatusDto"
|
||||
},
|
||||
"faceDetection": {
|
||||
"$ref": "#/components/schemas/JobStatusDto"
|
||||
},
|
||||
"facialRecognition": {
|
||||
"$ref": "#/components/schemas/JobStatusDto"
|
||||
},
|
||||
"library": {
|
||||
"$ref": "#/components/schemas/JobStatusDto"
|
||||
},
|
||||
"metadataExtraction": {
|
||||
"$ref": "#/components/schemas/JobStatusDto"
|
||||
},
|
||||
"migration": {
|
||||
"$ref": "#/components/schemas/JobStatusDto"
|
||||
},
|
||||
"notifications": {
|
||||
"$ref": "#/components/schemas/JobStatusDto"
|
||||
},
|
||||
"ocr": {
|
||||
"$ref": "#/components/schemas/JobStatusDto"
|
||||
},
|
||||
"search": {
|
||||
"$ref": "#/components/schemas/JobStatusDto"
|
||||
},
|
||||
"sidecar": {
|
||||
"$ref": "#/components/schemas/JobStatusDto"
|
||||
},
|
||||
"smartSearch": {
|
||||
"$ref": "#/components/schemas/JobStatusDto"
|
||||
},
|
||||
"storageTemplateMigration": {
|
||||
"$ref": "#/components/schemas/JobStatusDto"
|
||||
},
|
||||
"thumbnailGeneration": {
|
||||
"$ref": "#/components/schemas/JobStatusDto"
|
||||
},
|
||||
"videoConversion": {
|
||||
"$ref": "#/components/schemas/JobStatusDto"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"backgroundTask",
|
||||
"backupDatabase",
|
||||
"duplicateDetection",
|
||||
"faceDetection",
|
||||
"facialRecognition",
|
||||
"library",
|
||||
"metadataExtraction",
|
||||
"migration",
|
||||
"notifications",
|
||||
"ocr",
|
||||
"search",
|
||||
"sidecar",
|
||||
"smartSearch",
|
||||
"storageTemplateMigration",
|
||||
"thumbnailGeneration",
|
||||
"videoConversion"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"AssetBulkDeleteDto": {
|
||||
"properties": {
|
||||
"force": {
|
||||
@@ -15866,65 +15795,6 @@
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"JobCommand": {
|
||||
"enum": [
|
||||
"start",
|
||||
"pause",
|
||||
"resume",
|
||||
"empty",
|
||||
"clear-failed"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"JobCommandDto": {
|
||||
"properties": {
|
||||
"command": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/JobCommand"
|
||||
}
|
||||
]
|
||||
},
|
||||
"force": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"command"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"JobCountsDto": {
|
||||
"properties": {
|
||||
"active": {
|
||||
"type": "integer"
|
||||
},
|
||||
"completed": {
|
||||
"type": "integer"
|
||||
},
|
||||
"delayed": {
|
||||
"type": "integer"
|
||||
},
|
||||
"failed": {
|
||||
"type": "integer"
|
||||
},
|
||||
"paused": {
|
||||
"type": "integer"
|
||||
},
|
||||
"waiting": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"active",
|
||||
"completed",
|
||||
"delayed",
|
||||
"failed",
|
||||
"paused",
|
||||
"waiting"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"JobCreateDto": {
|
||||
"properties": {
|
||||
"name": {
|
||||
@@ -15940,27 +15810,6 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"JobName": {
|
||||
"enum": [
|
||||
"thumbnailGeneration",
|
||||
"metadataExtraction",
|
||||
"videoConversion",
|
||||
"faceDetection",
|
||||
"facialRecognition",
|
||||
"smartSearch",
|
||||
"duplicateDetection",
|
||||
"backgroundTask",
|
||||
"storageTemplateMigration",
|
||||
"migration",
|
||||
"search",
|
||||
"sidecar",
|
||||
"library",
|
||||
"notifications",
|
||||
"backupDatabase",
|
||||
"ocr"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"JobSettingsDto": {
|
||||
"properties": {
|
||||
"concurrency": {
|
||||
@@ -15973,21 +15822,6 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"JobStatusDto": {
|
||||
"properties": {
|
||||
"jobCounts": {
|
||||
"$ref": "#/components/schemas/JobCountsDto"
|
||||
},
|
||||
"queueStatus": {
|
||||
"$ref": "#/components/schemas/QueueStatusDto"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"jobCounts",
|
||||
"queueStatus"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"LibraryResponseDto": {
|
||||
"properties": {
|
||||
"assetCount": {
|
||||
@@ -17559,6 +17393,101 @@
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"QueueCommand": {
|
||||
"enum": [
|
||||
"start",
|
||||
"pause",
|
||||
"resume",
|
||||
"empty",
|
||||
"clear-failed"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"QueueCommandDto": {
|
||||
"properties": {
|
||||
"command": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/QueueCommand"
|
||||
}
|
||||
]
|
||||
},
|
||||
"force": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"command"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"QueueName": {
|
||||
"enum": [
|
||||
"thumbnailGeneration",
|
||||
"metadataExtraction",
|
||||
"videoConversion",
|
||||
"faceDetection",
|
||||
"facialRecognition",
|
||||
"smartSearch",
|
||||
"duplicateDetection",
|
||||
"backgroundTask",
|
||||
"storageTemplateMigration",
|
||||
"migration",
|
||||
"search",
|
||||
"sidecar",
|
||||
"library",
|
||||
"notifications",
|
||||
"backupDatabase",
|
||||
"ocr"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"QueueResponseDto": {
|
||||
"properties": {
|
||||
"jobCounts": {
|
||||
"$ref": "#/components/schemas/QueueStatisticsDto"
|
||||
},
|
||||
"queueStatus": {
|
||||
"$ref": "#/components/schemas/QueueStatusDto"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"jobCounts",
|
||||
"queueStatus"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"QueueStatisticsDto": {
|
||||
"properties": {
|
||||
"active": {
|
||||
"type": "integer"
|
||||
},
|
||||
"completed": {
|
||||
"type": "integer"
|
||||
},
|
||||
"delayed": {
|
||||
"type": "integer"
|
||||
},
|
||||
"failed": {
|
||||
"type": "integer"
|
||||
},
|
||||
"paused": {
|
||||
"type": "integer"
|
||||
},
|
||||
"waiting": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"active",
|
||||
"completed",
|
||||
"delayed",
|
||||
"failed",
|
||||
"paused",
|
||||
"waiting"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"QueueStatusDto": {
|
||||
"properties": {
|
||||
"isActive": {
|
||||
@@ -17574,6 +17503,77 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"QueuesResponseDto": {
|
||||
"properties": {
|
||||
"backgroundTask": {
|
||||
"$ref": "#/components/schemas/QueueResponseDto"
|
||||
},
|
||||
"backupDatabase": {
|
||||
"$ref": "#/components/schemas/QueueResponseDto"
|
||||
},
|
||||
"duplicateDetection": {
|
||||
"$ref": "#/components/schemas/QueueResponseDto"
|
||||
},
|
||||
"faceDetection": {
|
||||
"$ref": "#/components/schemas/QueueResponseDto"
|
||||
},
|
||||
"facialRecognition": {
|
||||
"$ref": "#/components/schemas/QueueResponseDto"
|
||||
},
|
||||
"library": {
|
||||
"$ref": "#/components/schemas/QueueResponseDto"
|
||||
},
|
||||
"metadataExtraction": {
|
||||
"$ref": "#/components/schemas/QueueResponseDto"
|
||||
},
|
||||
"migration": {
|
||||
"$ref": "#/components/schemas/QueueResponseDto"
|
||||
},
|
||||
"notifications": {
|
||||
"$ref": "#/components/schemas/QueueResponseDto"
|
||||
},
|
||||
"ocr": {
|
||||
"$ref": "#/components/schemas/QueueResponseDto"
|
||||
},
|
||||
"search": {
|
||||
"$ref": "#/components/schemas/QueueResponseDto"
|
||||
},
|
||||
"sidecar": {
|
||||
"$ref": "#/components/schemas/QueueResponseDto"
|
||||
},
|
||||
"smartSearch": {
|
||||
"$ref": "#/components/schemas/QueueResponseDto"
|
||||
},
|
||||
"storageTemplateMigration": {
|
||||
"$ref": "#/components/schemas/QueueResponseDto"
|
||||
},
|
||||
"thumbnailGeneration": {
|
||||
"$ref": "#/components/schemas/QueueResponseDto"
|
||||
},
|
||||
"videoConversion": {
|
||||
"$ref": "#/components/schemas/QueueResponseDto"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"backgroundTask",
|
||||
"backupDatabase",
|
||||
"duplicateDetection",
|
||||
"faceDetection",
|
||||
"facialRecognition",
|
||||
"library",
|
||||
"metadataExtraction",
|
||||
"migration",
|
||||
"notifications",
|
||||
"ocr",
|
||||
"search",
|
||||
"sidecar",
|
||||
"smartSearch",
|
||||
"storageTemplateMigration",
|
||||
"thumbnailGeneration",
|
||||
"videoConversion"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"RandomSearchDto": {
|
||||
"properties": {
|
||||
"albumIds": {
|
||||
|
||||
@@ -699,7 +699,7 @@ export type AssetFaceDeleteDto = {
|
||||
export type FaceDto = {
|
||||
id: string;
|
||||
};
|
||||
export type JobCountsDto = {
|
||||
export type QueueStatisticsDto = {
|
||||
active: number;
|
||||
completed: number;
|
||||
delayed: number;
|
||||
@@ -711,33 +711,33 @@ export type QueueStatusDto = {
|
||||
isActive: boolean;
|
||||
isPaused: boolean;
|
||||
};
|
||||
export type JobStatusDto = {
|
||||
jobCounts: JobCountsDto;
|
||||
export type QueueResponseDto = {
|
||||
jobCounts: QueueStatisticsDto;
|
||||
queueStatus: QueueStatusDto;
|
||||
};
|
||||
export type AllJobStatusResponseDto = {
|
||||
backgroundTask: JobStatusDto;
|
||||
backupDatabase: JobStatusDto;
|
||||
duplicateDetection: JobStatusDto;
|
||||
faceDetection: JobStatusDto;
|
||||
facialRecognition: JobStatusDto;
|
||||
library: JobStatusDto;
|
||||
metadataExtraction: JobStatusDto;
|
||||
migration: JobStatusDto;
|
||||
notifications: JobStatusDto;
|
||||
ocr: JobStatusDto;
|
||||
search: JobStatusDto;
|
||||
sidecar: JobStatusDto;
|
||||
smartSearch: JobStatusDto;
|
||||
storageTemplateMigration: JobStatusDto;
|
||||
thumbnailGeneration: JobStatusDto;
|
||||
videoConversion: JobStatusDto;
|
||||
export type QueuesResponseDto = {
|
||||
backgroundTask: QueueResponseDto;
|
||||
backupDatabase: QueueResponseDto;
|
||||
duplicateDetection: QueueResponseDto;
|
||||
faceDetection: QueueResponseDto;
|
||||
facialRecognition: QueueResponseDto;
|
||||
library: QueueResponseDto;
|
||||
metadataExtraction: QueueResponseDto;
|
||||
migration: QueueResponseDto;
|
||||
notifications: QueueResponseDto;
|
||||
ocr: QueueResponseDto;
|
||||
search: QueueResponseDto;
|
||||
sidecar: QueueResponseDto;
|
||||
smartSearch: QueueResponseDto;
|
||||
storageTemplateMigration: QueueResponseDto;
|
||||
thumbnailGeneration: QueueResponseDto;
|
||||
videoConversion: QueueResponseDto;
|
||||
};
|
||||
export type JobCreateDto = {
|
||||
name: ManualJobName;
|
||||
};
|
||||
export type JobCommandDto = {
|
||||
command: JobCommand;
|
||||
export type QueueCommandDto = {
|
||||
command: QueueCommand;
|
||||
force?: boolean;
|
||||
};
|
||||
export type LibraryResponseDto = {
|
||||
@@ -2805,10 +2805,10 @@ export function reassignFacesById({ id, faceDto }: {
|
||||
/**
|
||||
* Retrieve queue counts and status
|
||||
*/
|
||||
export function getAllJobsStatus(opts?: Oazapfts.RequestOpts) {
|
||||
export function getQueuesLegacy(opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchJson<{
|
||||
status: 200;
|
||||
data: AllJobStatusResponseDto;
|
||||
data: QueuesResponseDto;
|
||||
}>("/jobs", {
|
||||
...opts
|
||||
}));
|
||||
@@ -2828,17 +2828,17 @@ export function createJob({ jobCreateDto }: {
|
||||
/**
|
||||
* Run jobs
|
||||
*/
|
||||
export function sendJobCommand({ id, jobCommandDto }: {
|
||||
id: JobName;
|
||||
jobCommandDto: JobCommandDto;
|
||||
export function runQueueCommandLegacy({ name, queueCommandDto }: {
|
||||
name: QueueName;
|
||||
queueCommandDto: QueueCommandDto;
|
||||
}, opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchJson<{
|
||||
status: 200;
|
||||
data: JobStatusDto;
|
||||
}>(`/jobs/${encodeURIComponent(id)}`, oazapfts.json({
|
||||
data: QueueResponseDto;
|
||||
}>(`/jobs/${encodeURIComponent(name)}`, oazapfts.json({
|
||||
...opts,
|
||||
method: "PUT",
|
||||
body: jobCommandDto
|
||||
body: queueCommandDto
|
||||
})));
|
||||
}
|
||||
/**
|
||||
@@ -5067,7 +5067,7 @@ export enum ManualJobName {
|
||||
MemoryCreate = "memory-create",
|
||||
BackupDatabase = "backup-database"
|
||||
}
|
||||
export enum JobName {
|
||||
export enum QueueName {
|
||||
ThumbnailGeneration = "thumbnailGeneration",
|
||||
MetadataExtraction = "metadataExtraction",
|
||||
VideoConversion = "videoConversion",
|
||||
@@ -5085,7 +5085,7 @@ export enum JobName {
|
||||
BackupDatabase = "backupDatabase",
|
||||
Ocr = "ocr"
|
||||
}
|
||||
export enum JobCommand {
|
||||
export enum QueueCommand {
|
||||
Start = "start",
|
||||
Pause = "pause",
|
||||
Resume = "resume",
|
||||
|
||||
Reference in New Issue
Block a user