Comparing version 1.1.26 to 1.1.27
39
index.js
@@ -504,5 +504,3 @@ const EventEmitter = require('events'); | ||
(typeof this.config.interval === 'object' && | ||
this.isSchedule(this.config.interval)) || | ||
(typeof this.config.interval === 'object' && | ||
typeof this.config.interval.isValid === 'function')) && | ||
this.isSchedule(this.config.interval))) && | ||
typeof this.config.jobs[i].interval === 'undefined' && | ||
@@ -530,3 +528,3 @@ typeof job.cron === 'undefined' && | ||
const schedule = later.schedule(later.parse.text(value)); | ||
if (schedule.isValid()) return schedule; | ||
if (schedule.isValid()) return later.parse.text(value); | ||
value = this.getHumanToMs(value); | ||
@@ -567,3 +565,2 @@ } | ||
// eslint-disable-next-line complexity | ||
run(name) { | ||
@@ -584,33 +581,3 @@ debug('run', name); | ||
workerData: { | ||
job: { | ||
...job, | ||
// <https://github.com/breejs/bree/issues/23> | ||
...(typeof job.cron === 'undefined' | ||
? {} | ||
: { | ||
cron: this.isSchedule(job.cron) | ||
? '[schedule]' | ||
: typeof job.cron.isValid === 'function' | ||
? '[later]' | ||
: job.cron | ||
}), | ||
...(typeof job.timeout === 'undefined' | ||
? {} | ||
: { | ||
timeout: this.isSchedule(job.timeout) | ||
? '[schedule]' | ||
: typeof job.timeout.isValid === 'function' | ||
? '[later]' | ||
: job.timeout | ||
}), | ||
...(typeof job.interval === 'undefined' | ||
? {} | ||
: { | ||
interval: this.isSchedule(job.interval) | ||
? '[schedule]' | ||
: typeof job.interval.isValid === 'function' | ||
? '[later]' | ||
: job.interval | ||
}) | ||
}, | ||
job, | ||
...(this.config.worker && this.config.worker.workerData | ||
@@ -617,0 +584,0 @@ ? this.config.worker.workerData |
{ | ||
"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.26", | ||
"version": "1.1.27", | ||
"author": "Nick Baugh <niftylettuce@gmail.com> (http://niftylettuce.com/)", | ||
@@ -6,0 +6,0 @@ "ava": { |
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
73251
753