Skip to content

Commit

Permalink
fix(worker): remove blockingConnection option (#2922)
Browse files Browse the repository at this point in the history
  • Loading branch information
roggervalf authored Nov 22, 2024
1 parent c7c827f commit 3b451d2
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 11 deletions.
1 change: 0 additions & 1 deletion src/classes/queue-events-producer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ export class QueueEventsProducer extends QueueBase {
super(
name,
{
blockingConnection: false,
...opts,
},
Connection,
Expand Down
3 changes: 1 addition & 2 deletions src/classes/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ export class Worker<
name,
{
...opts,
blockingConnection: true,
},
Connection,
);
Expand Down Expand Up @@ -963,7 +962,7 @@ will never work with more accuracy than 1ms. */
* This method waits for current jobs to finalize before returning.
*
* @param force - Use force boolean parameter if you do not want to wait for
* current jobs to be processed. When using telemetry, be mindful that it can
* current jobs to be processed. When using telemetry, be mindful that it can
* interfere with the proper closure of spans, potentially preventing them from being exported.
*
* @returns Promise that resolves when the worker has been closed.
Expand Down
6 changes: 0 additions & 6 deletions src/interfaces/queue-options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@ export interface QueueBaseOptions {
*/
connection: ConnectionOptions;

/**
* Denotes commands should retry indefinitely.
* @deprecated
*/
blockingConnection?: boolean;

/**
* Prefix for all queue keys.
*/
Expand Down
4 changes: 2 additions & 2 deletions tests/test_worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ describe('workers', function () {
// Add spy to worker.moveToActive
const spy = sinon.spy(worker, 'moveToActive');
const bclientSpy = sinon.spy(
await worker.blockingConnection.client,
await (worker as any).blockingConnection.client,
'bzpopmin',
);

Expand Down Expand Up @@ -521,7 +521,7 @@ describe('workers', function () {
// Add spy to worker.moveToActive
const spy = sinon.spy(worker, 'moveToActive');
const bclientSpy = sinon.spy(
await worker.blockingConnection.client,
await (worker as any).blockingConnection.client,
'bzpopmin',
);

Expand Down

0 comments on commit 3b451d2

Please sign in to comment.