Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

queue.pause(true, true) initializes bclient unnecessarily #1553

Closed
gabegorelick opened this issue Nov 8, 2019 · 0 comments · Fixed by #1552
Closed

queue.pause(true, true) initializes bclient unnecessarily #1553

gabegorelick opened this issue Nov 8, 2019 · 0 comments · Fixed by #1552

Comments

@gabegorelick
Copy link
Contributor

Description

When pausing a queue locally and not waiting for active jobs to finish, ie when calling queue.pause(true, true), Bull will initialize the blocking Redis client even if that client wasn't previously initialized.

This is a similar issue as #1346, but that issue dealt with queue.pause(true), and this issue is about queue.pause(true, true).

Minimal, Working Test code to reproduce the issue.

const Queue = require('bull');
const Redis = require('ioredis');

const queue = new Queue('foo', {
  createClient (type) {
    if (type === 'bclient') {
      throw new Error('This queue is not meant for processing');
    }

    return new Redis();
  }
});
queue.pause(true, true);

Bull version

develop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant