Skip to content

Commit

Permalink
fix(history): eslint-disable for deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
Iqro-dev committed Dec 27, 2024
1 parent 3789bad commit bd3bc62
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/modules/history/history.processor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 2 additions & 0 deletions src/modules/history/history.scheduler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit bd3bc62

Please sign in to comment.