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

node-resque

Package Overview
Dependencies
Maintainers
3
Versions
181
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-resque - npm Package Compare versions

Comparing version 6.0.5 to 6.0.6

8

dist/core/queue.d.ts

@@ -40,3 +40,3 @@ /// <reference types="node" />

*/
queues(): Promise<any>;
queues(): Promise<string[]>;
/**

@@ -70,3 +70,3 @@ * - delete a queue, and all jobs in that queue.

delayedAt(timestamp: number): Promise<{
tasks: any;
tasks: any[];
rTimestamp: number;

@@ -78,3 +78,3 @@ }>;

*/
queued(q: string, start: number, stop: number): Promise<any>;
queued(q: string, start: number, stop: number): Promise<any[]>;
/**

@@ -119,3 +119,3 @@ * - jobsHash is an object with its keys being timestamps, and the vales are arrays of jobs at each time.

*/
failed(start: number, stop: number): Promise<any>;
failed(start: number, stop: number): Promise<any[]>;
removeFailed(failedJob: ErrorPayload): Promise<number>;

@@ -122,0 +122,0 @@ retryAndRemoveFailed(failedJob: ErrorPayload): Promise<any>;

@@ -93,3 +93,3 @@ "use strict";

this.emit("workingTimestamp", timestamp);
await this.enqueueDelayedItemsForTimestamp(timestamp);
await this.enqueueDelayedItemsForTimestamp(parseInt(timestamp));
return this.poll();

@@ -137,9 +137,9 @@ }

}
const delted = await this.connection.redis.del(this.masterKey());
const deleted = await this.connection.redis.del(this.masterKey());
this.master = false;
return delted === 1 || delted.toString() === "true";
return deleted === 1 || deleted.toString() === "true";
}
async nextDelayedTimestamp() {
const time = Math.round(new Date().getTime() / 1000);
const items = await this.connection.redis.zrangebyscore(this.connection.key("delayed_queue_schedule"), "-inf", time, "limit", "0", "1");
const items = await this.connection.redis.zrangebyscore(this.connection.key("delayed_queue_schedule"), 0, time, "LIMIT", 0, 1);
if (items.length === 0) {

@@ -146,0 +146,0 @@ return;

@@ -11,2 +11,3 @@ "use strict";

const set = await this.queueObject.connection.redis.setnx(key, timeout);
//@ts-ignore
if (set === true || set === 1) {

@@ -13,0 +14,0 @@ return true;

@@ -6,3 +6,3 @@ {

"license": "Apache-2.0",
"version": "6.0.5",
"version": "6.0.6",
"homepage": "http://github.com/actionhero/node-resque",

@@ -30,15 +30,15 @@ "repository": {

"dependencies": {
"@types/ioredis": "^4.0.19",
"@types/jest": "^24.0.23",
"@types/node": "^12.12.7",
"@types/ioredis": "^4.14.2",
"@types/node": "^12.12.17",
"ioredis": "^4.14.1"
},
"devDependencies": {
"@types/jest": "^24.0.23",
"jest": "^24.9.0",
"node-schedule": "^1.3.2",
"prettier": "^1.19.1",
"ts-jest": "^24.1.0",
"ts-node": "^8.5.0",
"typedoc": "^0.15.1",
"typescript": "^3.7.2"
"ts-jest": "^24.2.0",
"ts-node": "^8.5.4",
"typedoc": "^0.15.4",
"typescript": "^3.7.3"
},

@@ -45,0 +45,0 @@ "jest": {

@@ -159,3 +159,3 @@ // To read notes about the master locking scheme, check out:

this.emit("workingTimestamp", timestamp);
await this.enqueueDelayedItemsForTimestamp(timestamp);
await this.enqueueDelayedItemsForTimestamp(parseInt(timestamp));
return this.poll();

@@ -221,5 +221,5 @@ } else {

const delted = await this.connection.redis.del(this.masterKey());
const deleted = await this.connection.redis.del(this.masterKey());
this.master = false;
return delted === 1 || delted.toString() === "true";
return deleted === 1 || deleted.toString() === "true";
}

@@ -231,7 +231,7 @@

this.connection.key("delayed_queue_schedule"),
"-inf",
0,
time,
"limit",
"0",
"1"
"LIMIT",
0,
1
);

@@ -238,0 +238,0 @@ if (items.length === 0) {

@@ -11,2 +11,4 @@ // If a job with the same name, queue, and args is already in the queue, do not enqueue it again

const set = await this.queueObject.connection.redis.setnx(key, timeout);
//@ts-ignore
if (set === true || set === 1) {

@@ -13,0 +15,0 @@ return true;

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