MCPcopy Create free account
hub / github.com/subquery/subql / setConcurrency

Method setConcurrency

packages/node-core/src/utils/queues/rampQueue.ts:52–60  ·  view source on GitHub ↗
(newConcurrency: number)

Source from the content-addressed store, hash-verified

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 {

Callers 1

adjustConcurrencyMethod · 0.95

Calls 1

debugMethod · 0.45

Tested by

no test coverage detected