From ce221afa9fe0e8247455633668df8845d66d9908 Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Thu, 31 Oct 2024 17:02:02 +0800 Subject: [PATCH] remove active job code, does not accomplish intended purpose --- Server/service/jobQueue.js | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/Server/service/jobQueue.js b/Server/service/jobQueue.js index 3793a256a..aaab725e5 100644 --- a/Server/service/jobQueue.js +++ b/Server/service/jobQueue.js @@ -428,19 +428,6 @@ class JobQueue { await this.queue.pause(); const jobs = await this.getJobs(); - // Stop currently active jobs - const redisClient = await this.queue.client; - const activeJobs = await this.queue.getJobs(["active"]); - if (activeJobs.length !== 0) { - this.logger.info({ message: "Attempting to stop active jobs..." }); - } - await Promise.all( - activeJobs.map(async (job) => { - await redisClient.del(`${this.queue.toKey(job.id)}:lock`); - await job.remove(); - }) - ); - // Remove all repeatable jobs for (const job of jobs) { await this.queue.removeRepeatableByKey(job.key);