repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
build(deps-dev): bump @types/node
[poolifier.git]
/
src
/
pools
/
selection-strategies
/
abstract-worker-choice-strategy.ts
diff --git
a/src/pools/selection-strategies/abstract-worker-choice-strategy.ts
b/src/pools/selection-strategies/abstract-worker-choice-strategy.ts
index cc38d196941e4611af2235a84899cd82ab55c9f0..c2b4d1d3d37b56c5101c235fa2f49cfcfb6bd5fd 100644
(file)
--- a/
src/pools/selection-strategies/abstract-worker-choice-strategy.ts
+++ b/
src/pools/selection-strategies/abstract-worker-choice-strategy.ts
@@
-93,6
+93,11
@@
export abstract class AbstractWorkerChoiceStrategy<
}
}
}
}
+ protected resetWorkerNodeKeyProperties (): void {
+ this.nextWorkerNodeKey = 0
+ this.previousWorkerNodeKey = 0
+ }
+
/** @inheritDoc */
public abstract reset (): boolean
/** @inheritDoc */
public abstract reset (): boolean
@@
-190,20
+195,10
@@
export abstract class AbstractWorkerChoiceStrategy<
}
/**
}
/**
- *
Assign to nextWorkerNodeKey property the chosen worker node ke
y.
+ *
Check the next worker node eligibilit
y.
*
* @param chosenWorkerNodeKey - The chosen worker node key.
*/
*
* @param chosenWorkerNodeKey - The chosen worker node key.
*/
- protected assignChosenWorkerNodeKey (
- chosenWorkerNodeKey: number | undefined
- ): void {
- if (chosenWorkerNodeKey != null) {
- this.nextWorkerNodeKey = chosenWorkerNodeKey
- } else {
- this.nextWorkerNodeKey = undefined
- }
- }
-
protected checkNextWorkerNodeEligibility (
chosenWorkerNodeKey: number | undefined
): void {
protected checkNextWorkerNodeEligibility (
chosenWorkerNodeKey: number | undefined
): void {