This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
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.
Add ability to run replication protocol over redis. #7040
Add ability to run replication protocol over redis. #7040
Changes from 7 commits
ccfadb2
1618671
e1b1105
73381c7
3d64aa2
59c7341
0edd48f
3e38f67
b1835b9
cdf399a
2a226da
e3f18eb
e46550a
c5fcff0
dd46cb4
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
I'm not entirely following why we can't have a custom constructor (even one that has
*args, **kwargs
that it passes through tosuper().__init__()
), but i guess it's not super-important.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.
can these be declared in
RedisSubscriber
's constructor?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.
The library is a bit of a mess, really. If we add these to the protocol constructor then we'll need to fully override
buildProtocol
, which does things other than just instantiate the protocol. So its not really clear how you're meant to use this without doing this or copy and pasting bits of the code around (though the library is designed to be copied into your repo rather than using pip, so maybe that is how you're meant to do it)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.
I've added a comment to that effect for now.
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.
is it? god, that doesn't inspire much confidence. Maybe we should do that then?
TBH my comment here was mostly that I wanted some recognition of the existence of these attributes in
RedisSubscriber
- even setting them toNone
is fine, so I think you've addressed this comment.one thought for a workaround would be to make
self.protocol
a callable which can add a few extra kwargs whichRedisSubscriber.__init__
could intercept. I'm not sure that buys a great deal though.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.
Maybe, my bias is against doing so though.