- this.roundId = roundId ?? 0
- this.nextWorkerNodeId = workerNodeId ?? 0
- const chosenWorkerNodeKey = this.nextWorkerNodeId
- if (this.nextWorkerNodeId === this.pool.workerNodes.length - 1) {
- this.nextWorkerNodeId = 0
+ this.roundId = roundId
+ if (workerNodeId == null) {
+ this.previousWorkerNodeKey =
+ this.nextWorkerNodeKey ?? this.previousWorkerNodeKey
+ }
+ this.nextWorkerNodeKey = workerNodeId
+ const chosenWorkerNodeKey = this.nextWorkerNodeKey
+ if (this.nextWorkerNodeKey === this.pool.workerNodes.length - 1) {
+ this.nextWorkerNodeKey = 0