diff options
author | Ajay Ramachandran <[email protected]> | 2021-01-26 21:09:28 -0500 |
---|---|---|
committer | Ajay Ramachandran <[email protected]> | 2021-01-26 21:09:28 -0500 |
commit | 41fee58ab90717dd1f05ecbebeb887ae047877cf (patch) | |
tree | 478dbd558b02bc0d8de7a91205c0e3aad8a5670a | |
parent | 96f3264bff7616b3e195390001f7f6429b673508 (diff) | |
download | SponsorBlock-41fee58ab90717dd1f05ecbebeb887ae047877cf.tar.gz SponsorBlock-41fee58ab90717dd1f05ecbebeb887ae047877cf.zip |
Increase fetch frequency
-rw-r--r-- | src/content.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/content.ts b/src/content.ts index 9e9332e6..048d8898 100644 --- a/src/content.ts +++ b/src/content.ts @@ -652,7 +652,7 @@ async function sponsorsLookup(id: string) { //TODO lower when server becomes better (back to 1 second) //some error occurred, try again in a second - setTimeout(() => sponsorsLookup(id), 10000 + Math.random() * 30000); + setTimeout(() => sponsorsLookup(id), 5000 + Math.random() * 15000); sponsorLookupRetries++; } @@ -670,8 +670,7 @@ function retryFetch(id: string): void { //if less than 3 days old if (Date.now() - new Date(dateUploaded).getTime() < 259200000) { - //TODO lower when server becomes better - setTimeout(() => sponsorsLookup(id), 120000); + setTimeout(() => sponsorsLookup(id), 30000 + Math.random() * 90000); } }); |