Update index.ts

This commit is contained in:
Daniel Hougaard
2025-04-17 00:19:39 +04:00
parent 71bc65c293
commit 64fde98904

View File

@@ -45,7 +45,7 @@ const setupAxiosRetry = () => {
config._retryCount!++; config._retryCount!++;
const baseDelay = initialRetryDelay * Math.pow(backoffFactor, config._retryCount! - 1); const baseDelay = initialRetryDelay * Math.pow(backoffFactor, config._retryCount! - 1);
const jitter = baseDelay * 0.2; // 20% +/- jitter const jitter = baseDelay * 0.2; // 20% +/- jitter
const exponentialDelay = Math.min(baseDelay + (Math.random() * 2 - 1) * jitter); const exponentialDelay = baseDelay + (Math.random() * 2 - 1) * jitter;
return new Promise(resolve => { return new Promise(resolve => {
setTimeout(() => { setTimeout(() => {