From bd3bc622320dfee6be2e5a1991d77d9006b0f25c Mon Sep 17 00:00:00 2001 From: Iqro-dev Date: Thu, 19 Dec 2024 17:54:33 +0100 Subject: [PATCH] fix(history): eslint-disable for deprecations --- src/modules/history/history.processor.ts | 1 + src/modules/history/history.scheduler.ts | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/modules/history/history.processor.ts b/src/modules/history/history.processor.ts index 2ae991db..994f3674 100644 --- a/src/modules/history/history.processor.ts +++ b/src/modules/history/history.processor.ts @@ -54,6 +54,7 @@ export class HistoryProcessor extends WorkerHost { this.logger.warn(`Job has been removed from the queue`) if (repeatJobKey) { + // eslint-disable-next-line @typescript-eslint/no-deprecated, sonarjs/deprecation this.historyQueue.removeRepeatableByKey(repeatJobKey) this.logger.warn( diff --git a/src/modules/history/history.scheduler.ts b/src/modules/history/history.scheduler.ts index f4e78fa5..74209f32 100644 --- a/src/modules/history/history.scheduler.ts +++ b/src/modules/history/history.scheduler.ts @@ -45,10 +45,12 @@ export class HistoryScheduler implements OnApplicationBootstrap { async scheduleHistorySynchronizationForUser(user: User) { const jobId = synchronizeJobIdFactory(user.id, true) + // eslint-disable-next-line @typescript-eslint/no-deprecated, sonarjs/deprecation const repeatableJobs = await this.historyQueue.getRepeatableJobs() for (const synchronizeJob of repeatableJobs) if (synchronizeJob.id === jobId) + // eslint-disable-next-line @typescript-eslint/no-deprecated, sonarjs/deprecation await this.historyQueue.removeRepeatableByKey(synchronizeJob.key) this.logger.log(