Skip to content

Commit

Permalink
Update runner.js
Browse files Browse the repository at this point in the history
  • Loading branch information
sevenbitbyte authored Feb 8, 2024
1 parent a682b7f commit 0ba2959
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ class Runner extends EventEmitter {
if(this._noWorkCount >= 2){
clearTimeout(this._runWatchdog)
this.runningCount = undefined
this._runWatchdog = undefined

/**
* Idle event.
Expand Down Expand Up @@ -359,6 +360,8 @@ class Runner extends EventEmitter {
debug('restarting task - ', taskName, 'in', timeout||this._restartDelay, 'ms')
setTimeout(async ()=>{
let task = this.getTask(taskName)

debug('restarting', task)

if(!task){return}
await task.reset()
Expand Down Expand Up @@ -576,4 +579,4 @@ class Runner extends EventEmitter {

}

module.exports = Runner
module.exports = Runner

0 comments on commit 0ba2959

Please sign in to comment.