* Stops the worker check active interval.
*/
private stopCheckActive (): void {
- this.activeInterval != null && clearInterval(this.activeInterval)
+ if (this.activeInterval != null) {
+ clearInterval(this.activeInterval)
+ delete this.activeInterval
+ }
}
/**
id: task.id
})
} finally {
- if (!this.isMain && this.activeInterval != null) {
- this.lastTaskTimestamp = performance.now()
- }
+ this.updateLastTaskTimestamp()
}
}
})
})
.finally(() => {
- if (!this.isMain && this.activeInterval != null) {
- this.lastTaskTimestamp = performance.now()
- }
+ this.updateLastTaskTimestamp()
})
.catch(EMPTY_FUNCTION)
}
throw new Error('Performance statistics computation requirements not set')
}
}
+
+ private updateLastTaskTimestamp (): void {
+ if (!this.isMain && this.activeInterval != null) {
+ this.lastTaskTimestamp = performance.now()
+ }
+ }
}