mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
refactor: use connection IORedis
This commit is contained in:
parent
541728805f
commit
24e4930fc1
@ -3,11 +3,9 @@ import { logger } from "./logger";
|
||||
import type { QueueJob } from "./schema";
|
||||
import IORedis from "ioredis";
|
||||
|
||||
export const connection = new IORedis({
|
||||
export const connection = new IORedis(process.env.REDIS_URL || "", {
|
||||
maxRetriesPerRequest: null,
|
||||
path: process.env.REDIS_URL,
|
||||
});
|
||||
|
||||
export const jobQueue = new Queue("backupQueue", {
|
||||
connection,
|
||||
defaultJobOptions: {
|
||||
|
@ -1,7 +1,6 @@
|
||||
import { type Job, Worker } from "bullmq";
|
||||
import type { QueueJob } from "./schema";
|
||||
import { runJobs } from "./utils";
|
||||
import Redis from "ioredis";
|
||||
import { connection } from "./queue";
|
||||
|
||||
export const firstWorker = new Worker(
|
||||
|
Loading…
Reference in New Issue
Block a user