mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-07-10 16:35:26 +02:00
fix(schedules): ensure cronSchedule is always a string when removing jobs
- Updated the job removal logic to default cronSchedule to an empty string if job.pattern is undefined, preventing potential errors during job removal.
This commit is contained in:
@@ -1,13 +1,11 @@
|
||||
import { Queue, type RepeatableJob } from "bullmq";
|
||||
import IORedis from "ioredis";
|
||||
import { logger } from "./logger.js";
|
||||
import type { QueueJob } from "./schema.js";
|
||||
|
||||
export const connection = new IORedis(process.env.REDIS_URL!, {
|
||||
maxRetriesPerRequest: null,
|
||||
});
|
||||
export const jobQueue = new Queue("backupQueue", {
|
||||
connection,
|
||||
connection: {
|
||||
url: process.env.REDIS_URL!,
|
||||
},
|
||||
defaultJobOptions: {
|
||||
removeOnComplete: true,
|
||||
removeOnFail: true,
|
||||
|
||||
Reference in New Issue
Block a user