Comparing version 1.1.17 to 1.1.18
@@ -14,2 +14,3 @@ const EventEmitter = require('events'); | ||
const { boolean } = require('boolean'); | ||
const { setTimeout, setInterval } = require('safe-timers'); | ||
@@ -635,3 +636,2 @@ class Bree extends EventEmitter { | ||
this.timeouts[name].clear(); | ||
else clearTimeout(this.timeouts[name]); | ||
delete this.timeouts[name]; | ||
@@ -646,3 +646,2 @@ } | ||
this.intervals[name].clear(); | ||
else clearInterval(this.intervals[name]); | ||
delete this.intervals[name]; | ||
@@ -666,3 +665,7 @@ } | ||
if (this.closeWorkerAfterMs[name]) { | ||
clearTimeout(this.closeWorkerAfterMs[name]); | ||
if ( | ||
typeof this.closeWorkerAfterMs[name] === 'object' && | ||
typeof this.closeWorkerAfterMs[name].clear === 'function' | ||
) | ||
this.closeWorkerAfterMs[name].clear(); | ||
delete this.closeWorkerAfterMs[name]; | ||
@@ -669,0 +672,0 @@ } |
{ | ||
"name": "bree", | ||
"description": "The best job scheduler for Node.js with support for cron, dates, ms, later, and human-friendly strings. Uses workers to spawn sandboxed processes, and supports async/await, retries, throttling, concurrency, and cancelable promises (graceful shutdown). Simple, fast, and the most lightweight tool for the job. Made for Forward Email and Lad.", | ||
"version": "1.1.17", | ||
"version": "1.1.18", | ||
"author": "Nick Baugh <niftylettuce@gmail.com> (http://niftylettuce.com/)", | ||
@@ -31,3 +31,4 @@ "ava": { | ||
"later": "^1.2.0", | ||
"ms": "^2.1.2" | ||
"ms": "^2.1.2", | ||
"safe-timers": "^1.1.0" | ||
}, | ||
@@ -34,0 +35,0 @@ "devDependencies": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
67585
617
9
+ Addedsafe-timers@^1.1.0
+ Addedsafe-timers@1.1.0(transitive)