Huge News!Announcing our $40M Series B led by Abstract Ventures.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.25.2 to 3.26.0

7

CHANGELOG.md

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

# [3.26.0](https://github.com/OptimalBits/bull/compare/v3.25.2...v3.26.0) (2021-07-16)
### Features
* **repeatable:** store key in repeat options ([dab0d82](https://github.com/OptimalBits/bull/commit/dab0d8266174f1d25ec914cff8450594d85db511))
## [3.25.2](https://github.com/OptimalBits/bull/compare/v3.25.1...v3.25.2) (2021-07-16)

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

65

lib/repeatable.js

@@ -41,38 +41,37 @@ 'use strict';

const jobId = repeat.jobId ? repeat.jobId + ':' : ':';
const repeatJobKey = getRepeatKey(name, repeat, jobId);
const repeatKey = getRepeatKey(name, repeat, jobId);
const createNextJob = () => {
return client
.zadd(this.keys.repeat, nextMillis, repeatJobKey)
.then(() => {
//
// Generate unique job id for this iteration.
//
const customId = getRepeatJobId(
name,
jobId,
nextMillis,
md5(repeatJobKey)
);
now = Date.now();
const delay = nextMillis - now;
return client.zadd(this.keys.repeat, nextMillis, repeatKey).then(() => {
//
// Generate unique job id for this iteration.
//
const customId = getRepeatJobId(
name,
jobId,
nextMillis,
md5(repeatKey)
);
now = Date.now();
const delay = nextMillis - now;
return Job.create(
this,
name,
data,
_.defaultsDeep(
{
repeat: {
count: currentCount
},
jobId: customId,
delay: delay < 0 ? 0 : delay,
timestamp: now,
prevMillis: nextMillis
return Job.create(
this,
name,
data,
_.defaultsDeep(
{
repeat: {
count: currentCount,
key: repeatKey
},
opts
)
);
});
jobId: customId,
delay: delay < 0 ? 0 : delay,
timestamp: now,
prevMillis: nextMillis
},
opts
)
);
});
};

@@ -87,3 +86,3 @@

return client
.zscore(this.keys.repeat, repeatJobKey)
.zscore(this.keys.repeat, repeatKey)
.then(repeatableExists => {

@@ -90,0 +89,0 @@ // The job could have been deleted since this check

{
"name": "bull",
"version": "3.25.2",
"version": "3.26.0",
"description": "Job manager",

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

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