diff --git a/apps/worker/src/main.ts b/apps/worker/src/main.ts index ec0c21d..11812c2 100644 --- a/apps/worker/src/main.ts +++ b/apps/worker/src/main.ts @@ -53,8 +53,7 @@ async function bootstrap() { const pool = new WhatsAppSessionPool(); // Dedicated Redis client for XADD stream writes (separate from BullMQ connections) - const { hostname, port } = new URL(env.REDIS_URL); - const streamRedis = new Redis({ host: hostname, port: parseInt(port || '6379', 10), maxRetriesPerRequest: null, lazyConnect: true }); + const streamRedis = new Redis(env.REDIS_URL, { maxRetriesPerRequest: null, lazyConnect: true }); await streamRedis.connect().catch((err) => logger.warn({ err }, 'Stream Redis connect failed — stream publish will be degraded')); const ingestWorker = createIngestWorker(env.REDIS_URL, prisma, pool, forwardQueue, indexQueue, streamRedis);