feat(queue): support REDIS_PASS for Redis AUTH

Wire optional REDIS_PASS into the BullMQ ioredis connection, redact
credentials in startup logs, and document REDIS_PASS plus JFLOW_ROLE.

Co-authored-by: Nasyarobby Putra <nasyarobby@gmail.com>
This commit is contained in:
Cursor Agent
2026-08-19 09:05:29 +00:00
co-authored by nsrb
parent d122bd9a7f
commit 756ba8a7ac
3 changed files with 36 additions and 8 deletions
+3 -3
View File
@@ -26,7 +26,7 @@ import {
closeRedis,
createWorkflowQueue,
createWorkflowWorker,
getRedisUrl,
getRedisUrlForLog,
} from "./workflow-queue.js";
await migrate();
@@ -52,13 +52,13 @@ const role = (process.env.JFLOW_ROLE || "all").toLowerCase();
const runApi = role === "all" || role === "api";
const runWorker = role === "all" || role === "worker";
log.info({ redis: getRedisUrl(), role }, "starting jerapah-flow");
log.info({ redis: getRedisUrlForLog(), role }, "starting jerapah-flow");
const workflowQueue = createWorkflowQueue();
try {
await workflowQueue.waitUntilReady();
} catch (err) {
log.error({ err, redis: getRedisUrl() }, "failed to connect to Redis");
log.error({ err, redis: getRedisUrlForLog() }, "failed to connect to Redis");
process.exit(1);
}