Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pg-scheduler

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pg-scheduler - npm Package Compare versions

Comparing version 4.0.0-beta2 to 4.0.0-beta3

1

dst/Queue.d.ts

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

getTasksIds(): number[];
readonly length: number;
}

@@ -45,3 +45,6 @@ "use strict";

}
get length() {
return this.queue.length;
}
}
exports.Queue = Queue;

@@ -30,2 +30,3 @@ /// <reference types="sequelize" />

errorHandler: (err: Error) => void;
maxQueueCapacity: number;
}

@@ -32,0 +33,0 @@ export interface TaskOptions {

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

maxConcurrency: 20,
maxQueueCapacity: 50,
};

@@ -159,2 +160,10 @@ class Scheduler {

clearTimeout(this.pollingTimeout);
if (this.stopping) {
return;
}
if (this.queue.length + this.noProcessors.length > this.options.maxQueueCapacity) {
debug(`${process.pid} maxQueueCapacity overflow: ${this.queue.length} + ${this.noProcessors.length} > ${this.options.maxQueueCapacity}`);
this.pollingRepeat();
return;
}
const currDate = new Date(), defaultWhere = {

@@ -328,2 +337,3 @@ nextRunAt: { $lte: currDate },

console.error('processor completes with error', err);
// TODO: make optional saving error to "TasksErrors" table
task.failsCount++;

@@ -330,0 +340,0 @@ }

2

package.json
{
"name": "pg-scheduler",
"version": "4.0.0-beta2",
"version": "4.0.0-beta3",
"scripts": {

@@ -5,0 +5,0 @@ "test": "NODE_ENV=testing mocha test/**/*.ts",

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