-
Notifications
You must be signed in to change notification settings - Fork 156
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
Change RedisBackend to accept Redis client directly #755
Change RedisBackend to accept Redis client directly #755
Conversation
Looks good to me. |
@Dreamsorcerer , thank you for the feedback! LMK what you think of the changes |
Seems there still some issues with the examples and the factory code. I'm wondering if it'll be easier to just create a PR for #677 first, and then update this one. |
@Dreamsorcerer , Probably. I have a PR which fixes all the broken code in |
b611d5b
to
38c3849
Compare
I also can't get any of the performance tests running locally 😞 . I ran |
Codecov Report
@@ Coverage Diff @@
## master #755 +/- ##
==========================================
+ Coverage 99.73% 99.76% +0.02%
==========================================
Files 35 36 +1
Lines 3812 3794 -18
==========================================
- Hits 3802 3785 -17
+ Misses 10 9 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Sentry.
|
Great, thanks for getting all of that working! |
@Dreamsorcerer , Thanks for helping get this over the finish line, and building this library! |
What do these changes do?
These changes implement the feedback from this PR:
#691 (comment)
Fixes #550
This PR removes the construction of the redis.Redis object from the RedisBackend class and makes it a dependency. This allows users of the library to construct their Redis instances which might have to have a custom SSL cert, or be a more complex use case. This allows apps using this package to only have one redis instance to manage if they want to use redis for other things.
Are there changes in behavior for the user?
This PR also does a few other things (unfortunately)
0. It changes the constructor of the RedisBackend to take in a client instead of client args. This means that the
RedisBackend
class's public members likeport
will be moved to deeper in the code.endpoint
tohost
. This naming is consistent with redis and your aiomcache librarypool_max_size
-->pool_max_size
andcreate_connection_timeout
-->create_connection_timeout
to be consistent with the naming in redis-py.pool_min_size
from the RedisBackend constructor (I assume I may as well remove it)Related issue number
Fixes #691
Checklist
CHANGES
folder<issue_id>.<type>
(e.g.588.bugfix
)issue_id
change it to the pr id after creating the PR.feature
: Signifying a new feature..bugfix
: Signifying a bug fix..doc
: Signifying a documentation improvement..removal
: Signifying a deprecation or removal of public API..misc
: A ticket has been closed, but it is not of interest to users.Fix issue with non-ascii contents in doctest text files.