fix(aws): increase backoff and handle throttling in DescribeTasks/GetRecords
parent
af988e6d2a
commit
f7df350964
|
@ -148,7 +148,9 @@ class AWSTaskRunner {
|
||||||
if (!isThrottle || attempt === maxAttempts) {
|
if (!isThrottle || attempt === maxAttempts) {
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
CloudRunnerLogger.log(`AWS throttled DescribeTasks (attempt ${attempt}/${maxAttempts}), backing off ${delayMs}ms`);
|
CloudRunnerLogger.log(
|
||||||
|
`AWS throttled DescribeTasks (attempt ${attempt}/${maxAttempts}), backing off ${delayMs}ms`,
|
||||||
|
);
|
||||||
await new Promise((r) => setTimeout(r, delayMs));
|
await new Promise((r) => setTimeout(r, delayMs));
|
||||||
delayMs *= 2;
|
delayMs *= 2;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue