upstash / redis-js

HTTP based Redis Client for Serverless and Edge Functions
https://docs.upstash.com/redis
MIT License
696 stars 56 forks source link

Remove sleep after the last retry attempt #1342

Closed CahidArda closed 3 weeks ago

CahidArda commented 3 weeks ago

The http client would sleep event after the last retry, which resulted in the following behavior:

failing
sleeping 50
failing
sleeping 135.91409142295225
failing
sleeping 369.4528049465325
failing
sleeping 1004.2768461593834
failing
sleeping 2729.907501657212
failing
sleeping 7420.65795512883
throw

now the last sleep is removed. Error is thrown immedietly after the last (5th) retry failure.

linear[bot] commented 3 weeks ago

DX-1338 Fix retry logic in vector and redis sdks