(newConcurrency: number)
| 50 | } |
| 51 | |
| 52 | private setConcurrency(newConcurrency: number) { |
| 53 | const clamped = Math.max(1, Math.min(Math.floor(newConcurrency), this.#maxConcurrency)); |
| 54 | if (clamped > this.concurrency) { |
| 55 | logger.debug(`${this.name} increased concurrency to ${clamped}`); |
| 56 | } else if (clamped < this.concurrency) { |
| 57 | logger.debug(`${this.name} decreased concurrency to ${clamped}`); |
| 58 | } |
| 59 | this.concurrency = clamped; |
| 60 | } |
| 61 | |
| 62 | private adjustConcurrency(data: T): void { |
| 63 | try { |
no test coverage detected