Skip to content

Commit 6d3538f

Browse files
committed
fix: configure bullmq with prefix when present
1 parent bea0735 commit 6d3538f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/index.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,11 @@ client.KEYS(`${config.BULL_PREFIX}:*`, (err, keys) => {
3434
const queueList = Array.from(uniqKeys).sort().map(
3535
(item) => {
3636
if (config.BULL_VERSION === 'BULLMQ') {
37-
return new BullMQAdapter(new bullmq.Queue(item, {connection: redisConfig.redis}));
37+
const options = { connection: redisConfig.redis };
38+
if (config.BULL_PREFIX) {
39+
options.prefix = config.BULL_PREFIX;
40+
}
41+
return new BullMQAdapter(new bullmq.Queue(item, options));
3842
}
3943

4044
return new BullAdapter(new Queue(item, redisConfig));

0 commit comments

Comments
 (0)