From ae8a3dee98e4350aca597a5cfbab52a58ca5b6ba Mon Sep 17 00:00:00 2001 From: roggervalf Date: Tue, 19 Nov 2024 22:46:56 -0500 Subject: [PATCH] fix(scheduler): use Job class from getter for extension --- src/classes/job-scheduler.ts | 2 +- src/classes/queue-getters.ts | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/src/classes/job-scheduler.ts b/src/classes/job-scheduler.ts index 8bba169f92..63c0f8199c 100644 --- a/src/classes/job-scheduler.ts +++ b/src/classes/job-scheduler.ts @@ -194,7 +194,7 @@ export class JobScheduler extends QueueBase { mergedOpts.repeat = { ...opts.repeat, count: currentCount }; - const job = new Job(this, name, data, mergedOpts, jobId); + const job = new this.Job(this, name, data, mergedOpts, jobId); job.addJob(client); return job; diff --git a/src/classes/queue-getters.ts b/src/classes/queue-getters.ts index 8740cf5df4..29e0e9d1c3 100644 --- a/src/classes/queue-getters.ts +++ b/src/classes/queue-getters.ts @@ -45,13 +45,6 @@ export class QueueGetters extends QueueBase { }); } - /** - * Helper to easily extend Job class calls. - */ - protected get Job(): typeof Job { - return Job; - } - private sanitizeJobTypes(types: JobType[] | JobType | undefined): JobType[] { const currentTypes = typeof types === 'string' ? [types] : types;