Skip to content

Commit

Permalink
Merge pull request #85 from ohwillie/fix-redis-url-for-bull
Browse files Browse the repository at this point in the history
Fix Bull queue construction so the url option is respected.
  • Loading branch information
bradvogel authored Jan 17, 2018
2 parents 7a3d7fd + 3d21a07 commit 1dfb4ba
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions src/server/queue/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,26 +38,24 @@ class Queues {

const isBee = type === 'bee';

const options = {
redis: redis || url || redisHost
};
if (prefix) options.prefix = prefix;

let queue;
if (isBee) {
const options = {
redis: redis || url || redisHost,
_.extend(options, {
isWorker: false,
getEvents: false,
sendEvents: false,
storeJobs: false
};
if (prefix) options.prefix = prefix;
});

queue = new Bee(name, options);
queue.IS_BEE = true;
} else {
const options = {
redis: redis || redisHost
};
if (prefix) options.prefix = prefix;

queue = new Bull(name, options || url);
queue = new Bull(name, options);
}

this._queues[queueHost] = this._queues[queueHost] || {};
Expand Down

0 comments on commit 1dfb4ba

Please sign in to comment.