High performance self-hosted photo and video management solution.
TypeScript backup-toolfluttergoogle-photosgoogle-photos-alternativejavascriptmobile-appnestjsnodejsphoto-galleryphotosphotos-managementself-hostedsveltesveltekittypescriptvideos
fix(deps): update dependency bullmq to v6 (#31914)
renovate[bot]6b6b38ce0939
diff --git a/e2e/src/utils.ts b/e2e/src/utils.tsindex 94f747effa..c68de73cf9 100644--- a/e2e/src/utils.ts+++ b/e2e/src/utils.ts@@ -657,13 +657,13 @@ export const utils = {isQueueEmpty: async (accessToken: string, queue: keyof QueuesResponseLegacyDto) => {const queues = await getQueuesLegacy({ headers: asBearerAuth(accessToken) });const jobCounts = queues[queue].jobCounts;- return !jobCounts.active && !jobCounts.waiting;+ return !jobCounts.active && (!jobCounts.waiting || queues[queue].queueStatus.isPaused);},waitForQueueFinish: (accessToken: string, queue: keyof QueuesResponseLegacyDto, ms?: number) => {// eslint-disable-next-line no-async-promise-executorreturn new Promise<void>(async (resolve, reject) => {- const timeout = setTimeout(() => reject(new Error('Timed out waiting for queue to empty')), ms || 10_000);+ const timeout = setTimeout(() => reject(new Error('Timed out waiting for queue to empty')), ms || 15_000);while (true) {const done = await utils.isQueueEmpty(accessToken, queue);diff --git a/open-api/immich-openapi-specs.json b/open-api/immich-openapi-specs.jsonindex 79b0142665..45a9e29aaf 100644--- a/open-api/immich-openapi-specs.json+++ b/open-api/immich-openapi-specs.json@@ -26154,8 +26154,7 @@"failed","completed","delayed",- "waiting",- "paused"+ "waiting"],"type": "string"},@@ -26249,7 +26248,23 @@"description": "Number of paused jobs","maximum": 9007199254740991,"minimum": -9007199254740991,- "type": "integer"+ "type": "integer",+ "x-immich-history": [+ {+ "version": "v2.0.0",+ "state": "Added"+ },+ {+ "version": "v4.0.0",+ "state": "Updated",+ "description": "A paused queue will now also shows its job as `waiting`"+ },+ {+ "version": "v4.0.0",+ "state": "Deprecated"+ }+ ],+ "x-immich-state": "Deprecated"},"waiting": {"description": "Number of waiting jobs",diff --git a/packages/sdk/src/fetch-client.ts b/packages/sdk/src/fetch-client.tsindex 75d0fddb5d..1c69893e82 100644--- a/packages/sdk/src/fetch-client.ts+++ b/packages/sdk/src/fetch-client.ts@@ -8436,8 +8436,7 @@ export enum QueueJobStatus {Failed = "failed",Completed = "completed",Delayed = "delayed",- Waiting = "waiting",- Paused = "paused"+ Waiting = "waiting"}export enum JobName {AssetDelete = "AssetDelete",diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 03a698a5fc..ba9704baf1 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -415,7 +415,7 @@ importers:version: 0.6.4'@nestjs/bullmq':specifier: ^12.0.0- version: 12.0.0(@nestjs/[email protected]([email protected])([email protected])([email protected]))(@nestjs/[email protected])([email protected]([email protected]))+ version: 12.0.0(@nestjs/[email protected]([email protected])([email protected])([email protected]))(@nestjs/[email protected])([email protected]([email protected]([email protected]))([email protected]))'@nestjs/common':specifier: ^12.0.0@@ -486,8 +486,8 @@ importers:specifier: ^2.2.0version: 2.3.0([email protected])bullmq:- specifier: ^5.51.0- version: 5.81.5([email protected])+ specifier: ^6.0.0chokidar:specifier: ^4.0.3version: 4.0.3@@ -6153,12 +6153,21 @@ packages:resolution: {integrity: sha512-JCWSCdun+4Ovd9BhM/Vtlmwb7oD6Wl4YiPRXXwhAuwlPhW1un/MKgXn7GZoFm53ginnoNzus69V8JWx0K393jg==}engines: {node: '>=18.20'}- resolution: {integrity: sha512-pW7pFc/X+9AEIx91TWTdIpZ1icfbJnA0unsyzD7VICjCUw8a3qedSjej5dxxn6LjfM1kr2jvalOCGbCmoA5Kxg==}- engines: {node: '>=12.22.0'}+ resolution: {integrity: sha512-savxnrdqckobnm31XWwCKTAswkxrNIqLD/PsdwgYaDpst0UdULu/QjOtPdn86KNrBq8WoHKhJvbgGK13dgPJ8w==}+ engines: {node: '>=14.17.0'}peerDependencies:+ bullmq-otel: '>=2.0.0'+ ioredis: '>=5.0.0'+ pg: '>=8.0.0'redis: '>=5.0.0'peerDependenciesMeta:+ bullmq-otel:+ optional: true+ ioredis:+ optional: true+ pg:+ optional: trueredis:optional: true@@ -6670,10 +6679,9 @@ packages:resolution: {integrity: sha512-aK6BbWfhf4U/wCcLHKPJl/xa6VkVstRaPywWtMKGwuOLc/wZTyQYuoxgvZnNsBvv7Kg3YTBQYYBCggcviQczuA==}- resolution: {integrity: sha512-p0SaNjrHOnQeR8/VnfGbmg9te2kfyYSQ7Sc/j/6DtPL3JQvKxmjO9TSjNFpujqV3vEYYBvNNvXSxzyksBWAx1Q==}- engines: {node: '>=12.0.0'}- deprecated: v4 is no longer maintained, upgrade to v5+ resolution: {integrity: sha512-JfAYMY0LZaWQTuict8PhtF/ksSnq8xefSDmQUnnoqvkPYkU/y3UP0DTWzJKFBz0P1IXsDG8q0vY3zHkoFZOhvw==}+ engines: {node: '>=18'}resolution: {integrity: sha512-fkdfq+b+AHI4cKdhZlppHveI/mgz2qpiYxcm+t5E5TsxX7QrLS1VE0+7GENEk9z0EeGPcpSciGv6ez24duWhwQ==}@@ -9783,8 +9791,8 @@ packages:resolution: {integrity: sha512-4kmO/MdyUIkLIvTPr8VHLil4AtoKIoniWPIEk5+CDy0xnWC84azhSFmuJ7PxZdsYtiP5kEeQsORAVIeMgxT+Hw==}hasBin: true- resolution: {integrity: sha512-cef05H/dSYpLpqp3sj/qyZh5vhUYCalnaLO7j1yOmpsR0y/XwLVtK7r5gn+U/F7CTEfMowcGhlUQJDLcLf7jcA==}+ resolution: {integrity: sha512-p/pBCVO63CsvvpkomUnNNag6+n38rULuDA6HHe70o2gtC8ODI52foF/4ko2qQcp6OiErJXTmrZeXmsGGHsIQNQ==}resolution: {integrity: sha512-7dqa0ZcFfzbefdTuIkzOSMvZWC0J7FLqBOjJUZvDCXShIURWKxAyTT1wHhnE5q19c7jOJf43IYYKjBmZVZmvhg==}@@ -16424,12 +16432,12 @@ snapshots:'@nestjs/core': 12.1.3(@nestjs/[email protected]([email protected])([email protected])([email protected]))(@nestjs/[email protected])(@nestjs/[email protected])([email protected])([email protected])tslib: 2.8.1- '@nestjs/[email protected](@nestjs/[email protected]([email protected])([email protected])([email protected]))(@nestjs/[email protected])([email protected]([email protected]))':+ '@nestjs/[email protected](@nestjs/[email protected]([email protected])([email protected])([email protected]))(@nestjs/[email protected])([email protected]([email protected]([email protected]))([email protected]))':dependencies:'@nestjs/bull-shared': 12.0.0(@nestjs/[email protected]([email protected])([email protected])([email protected]))(@nestjs/[email protected])'@nestjs/core': 12.1.3(@nestjs/[email protected]([email protected])([email protected])([email protected]))(@nestjs/[email protected])(@nestjs/[email protected])([email protected])([email protected])- bullmq: 5.81.5([email protected])tslib: 2.8.1'@nestjs/[email protected](@swc/[email protected](@swc/[email protected]))(@types/[email protected])([email protected](@typescript/[email protected])([email protected](@swc/[email protected](@swc/[email protected]))([email protected])([email protected]([email protected]))([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])))([email protected])([email protected])([email protected])([email protected](@swc/[email protected](@swc/[email protected]))([email protected])([email protected]([email protected]))([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))':@@ -19185,16 +19193,16 @@ snapshots:dependencies:- cron-parser: 4.9.0- ioredis: 5.11.1([email protected])- msgpackr: 2.0.5+ cron-parser: 5.10.2+ msgpackr: 2.1.0node-abort-controller: 3.1.1semver: 7.8.5tslib: 2.8.1- transitivePeerDependencies:- - supports-color+ optionalDependencies:+ ioredis: 5.11.1([email protected])+ pg: 8.23.1dependencies:@@ -19662,7 +19670,7 @@ snapshots:dependencies:luxon: 3.7.2@@ -23548,7 +23556,7 @@ snapshots:'@msgpackr-extract/msgpackr-extract-win32-x64': 3.0.4optional: trueoptionalDependencies:msgpackr-extract: 3.0.4diff --git a/server/package.json b/server/package.jsonindex 6390410140..84d09d4e27 100644--- a/server/package.json+++ b/server/package.json@@ -66,7 +66,7 @@"async-lock": "^1.4.0","bcrypt": "^6.0.0","body-parser": "^2.2.0",- "bullmq": "^5.51.0",+ "bullmq": "^6.0.0","chokidar": "^4.0.3","compression": "^1.8.0","cookie": "^1.0.2",diff --git a/server/src/dtos/queue.dto.ts b/server/src/dtos/queue.dto.tsindex 7013899fb4..0a57c2e7fe 100644--- a/server/src/dtos/queue.dto.ts+++ b/server/src/dtos/queue.dto.ts@@ -54,7 +54,16 @@ export const QueueStatisticsSchema = zfailed: z.int().describe('Number of failed jobs'),delayed: z.int().describe('Number of delayed jobs'),waiting: z.int().describe('Number of waiting jobs'),- paused: z.int().describe('Number of paused jobs'),+ paused: z+ .int()+ .describe('Number of paused jobs')+ .meta(+ new HistoryBuilder()+ .added('v2.0.0')+ .updated('v4.0.0', 'A paused queue will now also shows its job as `waiting`')+ .deprecated('v4.0.0')+ .getExtensions(),+ ),}).meta({ id: 'QueueStatisticsDto' });diff --git a/server/src/enum.ts b/server/src/enum.tsindex cd978257b2..4151c88d75 100644--- a/server/src/enum.ts+++ b/server/src/enum.ts@@ -869,7 +869,6 @@ export enum QueueJobStatus {Complete = 'completed',Delayed = 'delayed',Waiting = 'waiting',- Paused = 'paused',}export const QueueJobStatusSchema = z.enum(QueueJobStatus).describe('Queue job status').meta({ id: 'QueueJobStatus' });diff --git a/server/src/repositories/job.repository.ts b/server/src/repositories/job.repository.tsindex 77bb308402..4a3b78c82d 100644--- a/server/src/repositories/job.repository.ts+++ b/server/src/repositories/job.repository.ts@@ -187,7 +187,6 @@ export class JobRepository {'failed','delayed','waiting',- 'paused',) as unknown as Promise<JobCounts>;}diff --git a/server/src/services/person.service.spec.ts b/server/src/services/person.service.spec.tsindex 01319f81f3..6428e8c396 100644--- a/server/src/services/person.service.spec.ts+++ b/server/src/services/person.service.spec.ts@@ -898,7 +898,6 @@ describe(PersonService.name, () => {mocks.job.getJobCounts.mockResolvedValue({active: 1,waiting: 0,- paused: 0,completed: 0,failed: 0,delayed: 0,@@ -915,7 +914,6 @@ describe(PersonService.name, () => {mocks.job.getJobCounts.mockResolvedValue({active: 1,waiting: 1,- paused: 0,completed: 0,failed: 0,delayed: 0,@@ -931,7 +929,6 @@ describe(PersonService.name, () => {mocks.job.getJobCounts.mockResolvedValue({active: 1,waiting: 0,- paused: 0,completed: 0,failed: 0,delayed: 0,@@ -962,7 +959,6 @@ describe(PersonService.name, () => {mocks.job.getJobCounts.mockResolvedValue({active: 1,waiting: 0,- paused: 0,completed: 0,failed: 0,delayed: 0,@@ -994,7 +990,6 @@ describe(PersonService.name, () => {mocks.job.getJobCounts.mockResolvedValue({active: 1,waiting: 0,- paused: 0,completed: 0,failed: 0,delayed: 0,@@ -1049,7 +1044,6 @@ describe(PersonService.name, () => {mocks.job.getJobCounts.mockResolvedValue({active: 1,waiting: 0,- paused: 0,completed: 0,failed: 0,delayed: 0,diff --git a/server/src/services/queue.service.ts b/server/src/services/queue.service.tsindex cc7fc75150..425b1a1fd9 100644--- a/server/src/services/queue.service.ts+++ b/server/src/services/queue.service.ts@@ -185,7 +185,7 @@ export class QueueService extends BaseService {this.jobRepository.getJobCounts(name),this.jobRepository.isPaused(name),]);- return { name, isPaused, statistics };+ return { name, isPaused, statistics: { ...statistics, paused: 0 } };}private async start(name: QueueName, { force }: QueueCommandDto): Promise<void> {diff --git a/server/src/types.ts b/server/src/types.tsindex 194b6cef99..31973a0559 100644--- a/server/src/types.ts+++ b/server/src/types.ts@@ -343,7 +343,6 @@ export interface JobCounts {failed: number;delayed: number;waiting: number;- paused: number;}export type JobItem =diff --git a/server/test/medium/specs/services/person.service.spec.ts b/server/test/medium/specs/services/person.service.spec.tsindex 7b124e091e..a6a1f88e55 100644--- a/server/test/medium/specs/services/person.service.spec.ts+++ b/server/test/medium/specs/services/person.service.spec.ts@@ -518,7 +518,7 @@ describe(PersonService.name, () => {const jobRepo = ctx.getMock(JobRepository);ctx.getMock(StorageRepository).unlink.mockResolvedValue();jobRepo.waitForQueueCompletion.mockResolvedValue();- jobRepo.getJobCounts.mockResolvedValue({ active: 0, waiting: 0, completed: 0, delayed: 0, failed: 0, paused: 0 });+ jobRepo.getJobCounts.mockResolvedValue({ active: 0, waiting: 0, completed: 0, delayed: 0, failed: 0 });jobRepo.queueAll.mockResolvedValue();const { user } = await ctx.newUser();@@ -549,7 +549,7 @@ describe(PersonService.name, () => {const jobRepo = ctx.getMock(JobRepository);ctx.getMock(StorageRepository).unlink.mockResolvedValue();jobRepo.waitForQueueCompletion.mockResolvedValue();- jobRepo.getJobCounts.mockResolvedValue({ active: 0, waiting: 0, completed: 0, delayed: 0, failed: 0, paused: 0 });+ jobRepo.getJobCounts.mockResolvedValue({ active: 0, waiting: 0, completed: 0, delayed: 0, failed: 0 });jobRepo.queueAll.mockResolvedValue();const { user } = await ctx.newUser();diff --git a/web/src/routes/admin/queues/QueueCard.svelte b/web/src/routes/admin/queues/QueueCard.svelteindex 645feff873..171e917b02 100644--- a/web/src/routes/admin/queues/QueueCard.svelte+++ b/web/src/routes/admin/queues/QueueCard.svelte@@ -36,7 +36,7 @@const { icon, title, subtitle } = $derived(asQueueItem($t, queue));const { statistics } = $derived(queue);- let waitingCount = $derived(statistics.waiting + statistics.paused + statistics.delayed);+ let waitingCount = $derived(statistics.waiting + statistics.delayed);let isIdle = $derived(statistics.active + statistics.waiting === 0 && !queue.isPaused);let multipleButtons = $derived(allText || refreshText);diff --git a/web/src/routes/admin/queues/[name]/+page.svelte b/web/src/routes/admin/queues/[name]/+page.svelteindex 3adf607d7f..ed579445ab 100644--- a/web/src/routes/admin/queues/[name]/+page.svelte+++ b/web/src/routes/admin/queues/[name]/+page.svelte@@ -53,7 +53,7 @@<div class="mb-4 flex gap-1"><Badge>{$t('active_count', { values: { count: queue.statistics.active } })}</Badge>- <Badge>{$t('waiting_count', { values: { count: queue.statistics.waiting + queue.statistics.paused } })}</Badge>+ <Badge>{$t('waiting_count', { values: { count: queue.statistics.waiting } })}</Badge>{#if queue.statistics.failed > 0}<Badge color="danger">{$t('failed_count', { values: { count: queue.statistics.failed } })}</Badge>{/if}diff --git a/web/src/routes/admin/queues/[name]/+page.ts b/web/src/routes/admin/queues/[name]/+page.tsindex 446485e4f3..05cdbe2c2e 100644--- a/web/src/routes/admin/queues/[name]/+page.ts+++ b/web/src/routes/admin/queues/[name]/+page.ts@@ -15,7 +15,7 @@ export const load = (async ({ params, url }) => {const [queue, failedJobs] = await Promise.all([getQueue({ name }),- getQueueJobs({ name, status: [QueueJobStatus.Failed, QueueJobStatus.Paused] }),+ getQueueJobs({ name, status: [QueueJobStatus.Failed] }),]);const $t = await getFormatter();diff --git a/web/src/routes/admin/queues/[name]/QueueGraph.svelte b/web/src/routes/admin/queues/[name]/QueueGraph.svelteindex ba8d3d1011..50a8e08a83 100644--- a/web/src/routes/admin/queues/[name]/QueueGraph.svelte+++ b/web/src/routes/admin/queues/[name]/QueueGraph.svelte@@ -35,7 +35,7 @@if (statistics) {items[1].push(statistics.failed);items[2].push(statistics.active);- items[3].push(statistics.waiting + statistics.paused);+ items[3].push(statistics.waiting);} else {items[0].push(timestamp);items[1].push(null);