-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add a command_timeout to redisOptions #839
Conversation
the user can now specify both connect_timeout and command_timeout when creating redis context.
@michael-grunder - as we talked in #829, I added an option for |
This is a nice quality of life improvement. What do you think about a minor refactor on my branch? It's a bit easier for me to follow but doesn't change any functionality. |
looks good! |
I'm guessing it stands for "event library" but I didn't initially name them so I could be wrong. |
make sense. BTW - there are any other comments? |
No, it looks good but I'll run it through an async testing setup I've got before merging. I think we should include it in v1.0.0 |
@michael-grunder - any updates? |
I'm putting together v1.0.0 and will try to get it included. I may tweak the change a little bit to use the existing |
@yossigo Any objections to merging this for v1.0.0? Depending on how much of a stickler we want to be to semver I think even an additional struct field is technically a breaking change and would need to wait for 2.0.0 The alternative is to reserve the additional timeout field in v1.0.0 and push the feature in 1.0.1 which we would able to do while maintaining 100% ABI compatibility (and 100% source compatibility if we don't rename |
@michael-grunder I think it can be part of 1.0.0. BTW I am in favor of being strict with such changes, especially as hiredis traditionally offered basically no encapsulation and all major structs are all over the header files so every little change is a potential ABI breakage. |
Agreed. Might be worth looking at using opaque structures for the next major version although that's a long ways off. |
Small change to the logic introduced in #839
@valentinogeron Thanks, merged! I'm going to get this merged into the release/1.0.0-rc1 branch and update the docs and changelog. |
This change showed one negative effect for me.
Is the workaround (commented out) the right solution or should I open an issue? Edit: |
@wbangna - The PR goal is to have the ability to control the connect timeout and the command timeout separately. Your workaround will work, but you need to use
|
@valentinogeron Thank you for your response. My test was successful with the |
the user can now specify both connect_timeout and command_timeout
when creating redis context.