MCPcopy Index your code
hub / github.com/triggerdotdev/trigger.dev / retryAsync

Method retryAsync

apps/coordinator/src/backoff.ts:120–142  ·  view source on GitHub ↗
(maxRetries: number = this.#maxRetries ?? Infinity)

Source from the content-addressed store, hash-verified

118 }
119
120 async *retryAsync(maxRetries: number = this.#maxRetries ?? Infinity) {
121 let elapsed = 0;
122 let retry = 0;
123
124 while (retry <= maxRetries) {
125 const delay = this.delay(retry);
126 elapsed += delay;
127
128 if (elapsed > this.#maxElapsed) {
129 break;
130 }
131
132 yield {
133 delay: {
134 seconds: delay,
135 milliseconds: delay * 1000,
136 },
137 retry,
138 };
139
140 retry++;
141 }
142 }
143
144 async *[Symbol.asyncIterator]() {
145 yield* this.retryAsync();

Callers 1

Calls 1

delayMethod · 0.95

Tested by

no test coverage detected