Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
## [Unreleased]
+### Changed
+
+- Add infinite retries support in worker choice strategy.
+
## [3.0.11] - 2023-12-11
### Fixed
- `workerChoiceStrategyOptions` (optional) - The worker choice strategy options object to use in this pool.
Properties:
- - `retries` (optional) - The number of retries to perform if no worker is eligible.
+ - `retries` (optional) - The number of retries to perform if no worker is eligible. `Infinity` means infinite retries.
- `measurement` (optional) - The measurement to use in worker choice strategies: `runTime`, `waitTime` or `elu`.
- `runTime` (optional) - Use the tasks [simple moving median](./worker-choice-strategies.md#simple-moving-median) runtime instead of the tasks simple moving average runtime in worker choice strategies.
- `waitTime` (optional) - Use the tasks [simple moving median](./worker-choice-strategies.md#simple-moving-median) wait time instead of the tasks simple moving average wait time in worker choice strategies.
).choose()
if (
workerNodeKey == null &&
- this.retriesCount < (this.opts.retries as number)
+ (this.retriesCount < (this.opts.retries as number) ||
+ this.opts.retries === Infinity)
) {
this.retriesCount++
return this.execute()