New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

bull

Package Overview
Dependencies
Maintainers
1
Versions
198
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bull - npm Package Compare versions

Comparing version 3.19.1 to 3.20.0

7

CHANGELOG.md
# Changelog
## v.3.20.0
- feat(job): implement Job#retriedOn (#1868)
- fix: job default opts fixes #1904
[Changes](https://github.com/OptimalBits/bull/compare/v3.19.1...v3.20.0)
## v.3.19.1

@@ -4,0 +11,0 @@

36

lib/job.js

@@ -360,23 +360,15 @@ 'use strict';

this.processedOn = null;
this.retriedOn = Date.now();
return this.queue.client
.hdel(
this.queue.toKey(this.id),
'finishedOn',
'processedOn',
'failedReason'
)
.then((/*redisResult*/) => {
return scripts.reprocessJob(this, { state: 'failed' }).then(result => {
if (result === 1) {
return;
} else if (result === 0) {
throw new Error(errors.Messages.RETRY_JOB_NOT_EXIST);
} else if (result === -1) {
throw new Error(errors.Messages.RETRY_JOB_IS_LOCKED);
} else if (result === -2) {
throw new Error(errors.Messages.RETRY_JOB_NOT_FAILED);
}
});
});
return scripts.reprocessJob(this, { state: 'failed' }).then(result => {
if (result === 1) {
return;
} else if (result === 0) {
throw new Error(errors.Messages.RETRY_JOB_NOT_EXIST);
} else if (result === -1) {
throw new Error(errors.Messages.RETRY_JOB_IS_LOCKED);
} else if (result === -2) {
throw new Error(errors.Messages.RETRY_JOB_NOT_FAILED);
}
});
});

@@ -620,2 +612,6 @@ };

if (json.retriedOn) {
job.retriedOn = parseInt(json.retriedOn);
}
job.failedReason = json.failedReason;

@@ -622,0 +618,0 @@ job.attemptsMade = parseInt(json.attemptsMade || 0);

@@ -690,3 +690,3 @@ 'use strict';

}
opts = { ...opts, ...this.defaultJobOptions };
opts = { ...this.defaultJobOptions, ...opts };

@@ -716,4 +716,4 @@ opts.jobId = jobIdForGroup(this.limiter, opts, data);

opts: {
...this.defaultJobOptions,
...job.opts,
...this.defaultJobOptions,
jobId

@@ -720,0 +720,0 @@ }

@@ -451,3 +451,8 @@ /**

const args = [job.id, (job.opts.lifo ? 'R' : 'L') + 'PUSH', queue.token];
const args = [
job.id,
(job.opts.lifo ? 'R' : 'L') + 'PUSH',
queue.token,
Date.now()
];

@@ -454,0 +459,0 @@ return queue.client.reprocessJob(keys.concat(args));

{
"name": "bull",
"version": "3.19.1",
"version": "3.20.0",
"description": "Job manager",

@@ -5,0 +5,0 @@ "engines": {

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