Skip to content

Commit

Permalink
fix: 🐛 Update how Redis URL is passed to Bull
Browse files Browse the repository at this point in the history
Bull no longer allows passing the URL directly as the value of
`options.redis`. Instead, pass URL as a separate argument when present.

See OptimalBits/bull#2118 for additional context.
  • Loading branch information
Jonathan Mast committed Sep 8, 2021
1 parent 3d941e3 commit 8057b29
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/server/queue/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,14 @@ class Queues {
if (queueConfig.createClient)
options.createClient = queueConfig.createClient;

if (typeof options.redis === 'string') delete options.redis;

const {Bull} = this._config;
queue = new Bull(name, options);
if (url) {
queue = new Bull(name, url, options);
} else {
queue = new Bull(name, options);
}
queue.IS_BULL = true;
}

Expand Down

0 comments on commit 8057b29

Please sign in to comment.