-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
RESP3 modules support #2803
Merged
Merged
RESP3 modules support #2803
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
fc9fbc5
start cleaning
dvora-h 0faf16b
clean sone callbacks
dvora-h 5210e26
Merge branch '5.0' into resp3-response-callbacks
dvora-h a24af93
Merge branch '5.0' into resp3-response-callbacks
dvora-h c08d0ac
response callbacks
dvora-h 9553dc0
modules
dvora-h a70913d
tests
dvora-h baedc9c
finish sync search tests
dvora-h 20f7a46
linters
dvora-h 423584e
async modules
dvora-h bb4a0f9
linters
dvora-h f011f0c
Merge branch '5.0' into modules-resp3
dvora-h 2e494ef
revert redismod-url change
dvora-h File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my opinion it would be better to follow
Strategy
pattern here to re-organise code a little bit.Instead of maintaining all
RESP2, RESP3
stuff in one file and callif self.client.connection_pool.connection_kwargs.get("protocol") in ["3", 3]
condition along all code, it's better to keep it in separate objects f.eResp2Strategy
andResp3Strategy
.With this approach we will keep this file as simple as possible and protocol independent. Also we avoid additional code changes in this file in case if protocol will be changed or new RESP4 will be introduced in future.
From code perspective it should looks something like this:
And now this:
Turns into one liner like this:
Let me know if it's makes sense for you and you wan't to discuss it or you have any questions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vladvildanov correct -this is in the when ready cleanup list - I'll share it your way.