(interval, cb)
| 771 | } |
| 772 | |
| 773 | _safeCheckStalledJobs(interval, cb) { |
| 774 | const promise = this._checkStalledJobs(interval, cb); |
| 775 | // If a callback is not defined, then we must emit errors to avoid unhandled |
| 776 | // rejections. If there is a callback, then _checkStalledJobs will attach it |
| 777 | // as an error handler to `promise`. |
| 778 | if (!cb) promise.catch(this._emitErrorAfterTick); |
| 779 | } |
| 780 | |
| 781 | _scheduleStalledCheck(interval, cb) { |
| 782 | if (this.checkTimer || this.paused) return; |
no test coverage detected