fix: BullMQ crashes when not setting Redis config maxRetriesPerRequest to null

This commit is contained in:
alikia2x (寒寒) 2025-05-02 19:48:17 +08:00
parent d0aa27b2ad
commit 811a8261b3
Signed by: alikia2x
GPG Key ID: 56209E0CCD8420C6

View File

@ -3,4 +3,8 @@ import { Redis } from "ioredis";
const host = process.env.REDIS_HOST || "localhost";
const port = parseInt(process.env.REDIS_PORT) || 6379;
export const redis = new Redis(port, host);
export const redis = new Redis({
port: port,
host: host,
maxRetriesPerRequest: null,
});