Skip to content

feat: added commandTimeout option #2926

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bronikabrisbon
Copy link

@bronikabrisbon bronikabrisbon commented Apr 23, 2025

Description

Some calls to redis took too long in our app by this feature this calls can be aborted.
The PR adds a commandTimeout to the RedisClientOptions. If the commandTimeout is set in the createClient, then a timeout is set in the _executeCommand function.
The redisClient is used in the RateLimiterRedis in our app. In the case of a timeout the RateLimiterRedis insurance is supposed to be used as fallback. Therefore a Promise.race does not work.


Checklist

  • Does npm test pass with this change (including linting)?
  • Is the new or changed code fully tested?
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?

@bronikabrisbon bronikabrisbon changed the title add + use option commandTimeout feat: added commandTimeout option Apr 23, 2025
@bronikabrisbon bronikabrisbon marked this pull request as ready for review April 23, 2025 14:32
@bronikabrisbon bronikabrisbon marked this pull request as draft April 23, 2025 14:32
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant