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 and Worker opts processing logic #1382

Closed
arusakov opened this issue Aug 17, 2022 · 0 comments
Closed

Queue and Worker opts processing logic #1382

arusakov opened this issue Aug 17, 2022 · 0 comments

Comments

@arusakov
Copy link

arusakov commented Aug 17, 2022

Constructing of Queue and Worker are very similar, but:

In Queue constructor you can define sharedConnection & blockingConnection property from outside (https://github.com/taskforcesh/bullmq/blob/master/src/classes/queue.ts#L109-L117):

super(
      name,
      {
        sharedConnection: isRedisInstance(opts?.connection),
        blockingConnection: false,
        ...opts,
      },
      Connection,
    );

But in Worker you can not (https://github.com/taskforcesh/bullmq/blob/master/src/classes/worker.ts#L163-L171):

super(
      name,
      {
        ...opts,
        sharedConnection: isRedisInstance(opts.connection),
        blockingConnection: true,
      },
      Connection,
    );

What's the point? Is it bug? SharedConnection & BlockingConnection must always stick together?

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

No branches or pull requests

1 participant