remove active job code, does not accomplish intended purpose
This commit is contained in:
1 parent
c83e2cb6f2
commit
ce221afa9f
1 file changed
-13
@@ -428,19 +428,6 @@ class JobQueue {
|
|||||||
await this.queue.pause();
|
await this.queue.pause();
|
||||||
const jobs = await this.getJobs();
|
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
|
// Remove all repeatable jobs
|
||||||
for (const job of jobs) {
|
for (const job of jobs) {
|
||||||
await this.queue.removeRepeatableByKey(job.key);
|
await this.queue.removeRepeatableByKey(job.key);
|
||||||
|
|||||||
Reference in new issue
Block a user