Socket
Socket
Sign inDemoInstall

bullmq

Package Overview
Dependencies
Maintainers
1
Versions
531
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bullmq - npm Package Compare versions

Comparing version 1.8.11 to 1.8.12

7

CHANGELOG.md

@@ -0,1 +1,8 @@

## [1.8.12](https://github.com/taskforcesh/bullmq/compare/v1.8.11...v1.8.12) (2020-06-04)
### Bug Fixes
* remove unused options ([23aadc3](https://github.com/taskforcesh/bullmq/commit/23aadc300b947693f4afb22296d236a924bd11ca))
## [1.8.11](https://github.com/taskforcesh/bullmq/compare/v1.8.10...v1.8.11) (2020-05-29)

@@ -2,0 +9,0 @@

5

dist/interfaces/advanced-options.d.ts
export interface AdvancedOptions {
stalledInterval?: number;
maxStalledCount?: number;
guardInterval?: number;
retryProcessDelay?: number;
backoffStrategies?: {};
drainDelay?: number;
}
export declare const AdvancedOptionsDefaults: AdvancedOptions;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AdvancedOptionsDefaults = {
stalledInterval: 30000,
maxStalledCount: 1,
guardInterval: 5000,
retryProcessDelay: 5000,
backoffStrategies: {},
drainDelay: 5,
};
//# sourceMappingURL=advanced-options.js.map

1

dist/interfaces/worker-options.d.ts

@@ -11,4 +11,3 @@ import { Job } from '../classes';

lockRenewTime?: number;
visibilityWindow?: number;
settings?: AdvancedOptions;
}

@@ -30,6 +30,2 @@ "use strict";

drainDelay: 1,
settings: {
guardInterval: 300000,
stalledInterval: 300000,
},
});

@@ -60,6 +56,2 @@ const completting = new Promise((resolve, reject) => {

drainDelay: 1,
settings: {
guardInterval: 300000,
stalledInterval: 300000,
},
});

@@ -98,6 +90,2 @@ const completting = new Promise((resolve, reject) => {

drainDelay: 1,
settings: {
guardInterval: 300000,
stalledInterval: 300000,
},
});

@@ -132,6 +120,2 @@ const completing = new Promise((resolve, reject) => {

drainDelay: 1,
settings: {
guardInterval: 300000,
stalledInterval: 300000,
},
});

@@ -169,6 +153,2 @@ await Promise.all([

drainDelay: 1,
settings: {
guardInterval: 300000,
stalledInterval: 300000,
},
});

@@ -208,6 +188,2 @@ const progresses = [];

drainDelay: 1,
settings: {
guardInterval: 300000,
stalledInterval: 300000,
},
});

@@ -254,6 +230,2 @@ const failing = new Promise((resolve, reject) => {

drainDelay: 1,
settings: {
guardInterval: 300000,
stalledInterval: 300000,
},
});

@@ -269,6 +241,2 @@ const job = await queue.add('test', {});

drainDelay: 1,
settings: {
guardInterval: 300000,
stalledInterval: 300000,
},
});

@@ -284,6 +252,2 @@ const job = await queue.add('test', { exitCode: 0 });

drainDelay: 1,
settings: {
guardInterval: 300000,
stalledInterval: 300000,
},
});

@@ -299,6 +263,2 @@ const job = await queue.add('test', { exitCode: 1 });

drainDelay: 1,
settings: {
guardInterval: 300000,
stalledInterval: 300000,
},
});

@@ -305,0 +265,0 @@ const completting = new Promise((resolve, reject) => {

# Stalled
{% hint style="info" %}
Stalled jobs checks will only work if there is at least one [`QueueScheduler`](../queuescheduler.md) instance configured in the Queue.
{% endhint %}
When a job is an active state, i.e., it is being processed by a worker, it needs to continuously update the queue to notify that the worker is still working on the job. This mechanism prevents that a worker that crashes or enters an endless loop will keep a job in active state for ever.

@@ -4,0 +8,0 @@

# QueueScheduler
The QueueScheduler is a helper class used to manage stalled and delayed jobs.
The QueueScheduler is a helper class used to manage stalled and delayed jobs for a given Queue.
This class automatically moves delayed jobs back to the waiting queue when it is the right time to process them. It also automatically checks for stalled jobs, i.e., detects jobs that are active but where the worker has either crashed or stopped working properly. [Stalled jobs](jobs/stalled.md) are moved back or failed depending on the settings selected when instantiating the class.
The reason for having this functionality in a separate class instead of in the workers \(as in Bull 3.x\) is because whereas you may want to have a large number of workers for parallel processing, for the scheduler you probably only want a couple of instances. One will be enough but you can have more just for redundancy.
The reason for having this functionality in a separate class instead of in the workers \(as in Bull 3.x\) is because whereas you may want to have a large number of workers for parallel processing, for the scheduler you probably only want a couple of instances for each queue that requires delayed or stalled checks. One will be enough but you can have more just for redundancy.

@@ -107,3 +107,3 @@ ---

{% hint style="danger" %}
For performance reasons the events emited by a `QueueEvents` instance do not contain the `Job` instance, only the `jobId`. Use the `Queue#getJob` method if you need the `Job` instance.
For performance reasons the events emited by a `QueueEvents` instance do not contain the `Job` instance, only the `jobId`. Use the `Job#fromId` method if you need the `Job` instance.
{% endhint %}
{
"name": "bullmq",
"version": "1.8.11",
"version": "1.8.12",
"description": "Queue for messages and jobs based on Redis",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

export interface AdvancedOptions {
// How often check for stalled jobs (use 0 for never checking).
stalledInterval?: number;
// Max amount of times a stalled job will be re-processed.
maxStalledCount?: number;
// Poll interval for delayed jobs and added jobs.
guardInterval?: number;
// delay before processing next job in case of internal error.
retryProcessDelay?: number;
// A set of custom backoff strategies keyed by name.
backoffStrategies?: {};
// A timeout for when the queue is in drained state (empty waiting for jobs).
drainDelay?: number;
}
export const AdvancedOptionsDefaults: AdvancedOptions = {
stalledInterval: 30000,
maxStalledCount: 1,
guardInterval: 5000,
retryProcessDelay: 5000,
backoffStrategies: {},
drainDelay: 5,
};

@@ -13,4 +13,3 @@ import { Job } from '../classes';

lockRenewTime?: number;
visibilityWindow?: number; // seconds // FIXME not used?
settings?: AdvancedOptions; // FIXME not used?
settings?: AdvancedOptions; // FIXME only backoffStrategies is used
}

@@ -33,6 +33,2 @@ import { expect } from 'chai';

drainDelay: 1,
settings: {
guardInterval: 300000,
stalledInterval: 300000,
},
});

@@ -67,6 +63,2 @@

drainDelay: 1,
settings: {
guardInterval: 300000,
stalledInterval: 300000,
},
});

@@ -111,6 +103,2 @@

drainDelay: 1,
settings: {
guardInterval: 300000,
stalledInterval: 300000,
},
});

@@ -151,6 +139,2 @@

drainDelay: 1,
settings: {
guardInterval: 300000,
stalledInterval: 300000,
},
});

@@ -195,6 +179,2 @@

drainDelay: 1,
settings: {
guardInterval: 300000,
stalledInterval: 300000,
},
});

@@ -240,6 +220,2 @@

drainDelay: 1,
settings: {
guardInterval: 300000,
stalledInterval: 300000,
},
});

@@ -294,6 +270,2 @@

drainDelay: 1,
settings: {
guardInterval: 300000,
stalledInterval: 300000,
},
});

@@ -314,6 +286,2 @@

drainDelay: 1,
settings: {
guardInterval: 300000,
stalledInterval: 300000,
},
});

@@ -336,6 +304,2 @@

drainDelay: 1,
settings: {
guardInterval: 300000,
stalledInterval: 300000,
},
});

@@ -358,6 +322,2 @@

drainDelay: 1,
settings: {
guardInterval: 300000,
stalledInterval: 300000,
},
});

@@ -364,0 +324,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc