Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
/** @inheritDoc */
public remove (workerNodeKey: number): boolean {
if (this.pool.workerNodes.length === 0) {
- this.reset()
+ this.resetWorkerNodeKeyProperties()
+ this.workerNodeId = 0
+ this.workerNodeVirtualTaskRunTime = 0
+ return true
}
if (
this.workerNodeId === workerNodeKey &&
public remove (workerNodeKey: number): boolean {
if (this.pool.workerNodes.length === 0) {
this.reset()
+ return true
}
if (
this.nextWorkerNodeKey === workerNodeKey &&
public remove (workerNodeKey: number): boolean {
if (this.pool.workerNodes.length === 0) {
this.reset()
+ return true
}
if (this.nextWorkerNodeKey === workerNodeKey) {
this.workerNodeVirtualTaskRunTime = 0
let retriesCount = 0
do {
workerNodeKey = workerChoiceStrategy.choose()
- if (workerNodeKey != null && workerNodeKey < 0) {
- workerNodeKey = undefined
- }
if (workerNodeKey == null && chooseCount > 0) {
retriesCount++
}