Data = unknown,
Response = unknown
> {
+ /**
+ * The number of worker choice strategy execution retries.
+ */
+ public retriesCount: number
+
/**
* The worker choice strategy instances registered in the context.
*/
>
/**
- * The number of worker choice strategy execution retries.
+ * The maximum number of worker choice strategy execution retries.
*/
private readonly retries: number
>(pool, opts)
]
])
+ this.retriesCount = 0
this.retries = getWorkerChoiceStrategyRetries(pool, opts)
}
do {
workerNodeKey = workerChoiceStrategy.choose()
if (workerNodeKey == null && chooseCount > 0) {
- retriesCount++
+ ++retriesCount
+ ++this.retriesCount
}
chooseCount++
} while (workerNodeKey == null && retriesCount < this.retries)