Skip to content

Commit

Permalink
Merge pull request #11 from kody-abe/patch-1
Browse files Browse the repository at this point in the history
Support for creating a Queue with options
  • Loading branch information
erikengervall authored Sep 11, 2019
2 parents 85d438a + cddc3af commit ff9d803
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ And then you can setup how your queues will work:

```js
const helloQueue = queues.add('helloQueue') // adds a queue
const helloQueueWithOpts = queues.add('helloQueue', {
prefix: 'hello',
}) // adds a queue with QueueOptions https://github.com/OptimalBits/bull/blob/master/REFERENCE.md#queue

// defines how the queue works
helloQueue.process(async job => {
Expand Down
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ module.exports = {
UI: UI(),
createQueues: redis => {
return {
add: name => {
const queue = new Queue(name, redis)
add: (name, opts) => {
const queue = new Queue(name, redis, opts)
queues[name] = queue

return queue
Expand Down

0 comments on commit ff9d803

Please sign in to comment.