diff --git a/lib/scheduler.js b/lib/scheduler.js index f2eeccd3..05af7131 100644 --- a/lib/scheduler.js +++ b/lib/scheduler.js @@ -197,11 +197,11 @@ class Scheduler extends EventEmitter { })) const nowInSeconds = Math.round(new Date().getTime() / 1000) - const stuckWorkerTimeoutInSeconts = Math.round(this.options.stuckWorkerTimeout / 1000) + const stuckWorkerTimeoutInSeconds = Math.round(this.options.stuckWorkerTimeout / 1000) for (let i in payloads) { const {name, time} = payloads[i] const delta = nowInSeconds - time - if (delta > stuckWorkerTimeoutInSeconts) { + if (delta > stuckWorkerTimeoutInSeconds) { await this.forceCleanWorker(name, delta) } i++