Lower retry frequency

(cherry picked from commit 3927fe5630)
This commit is contained in:
Ajay Ramachandran 2021-02-18 21:23:00 -05:00
parent 27fe2ca8f0
commit 383fe59bc0

View file

@ -647,12 +647,12 @@ async function sponsorsLookup(id: string) {
sponsorLookupRetries = 0;
} else if (response?.status === 404) {
retryFetch(id);
} else if (sponsorLookupRetries < 90 && !recheckStarted) {
} else if (sponsorLookupRetries < 15 && !recheckStarted) {
recheckStarted = true;
//TODO lower when server becomes better (back to 1 second)
//some error occurred, try again in a second
setTimeout(() => sponsorsLookup(id), 5000 + Math.random() * 15000);
setTimeout(() => sponsorsLookup(id), 5000 + Math.random() * 15000 + 5000 * sponsorLookupRetries);
sponsorLookupRetries++;
}