-
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
Client side caching invalidations (standalone) #3089
Conversation
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #3089 +/- ##
==========================================
+ Coverage 91.17% 91.49% +0.31%
==========================================
Files 127 129 +2
Lines 32855 33062 +207
==========================================
+ Hits 29956 30249 +293
+ Misses 2899 2813 -86 ☔ View full report in Codecov by Sentry. |
def handle_push_response(self, response, disable_decoding, push_request): | ||
if response[0] in _INVALIDATION_MESSAGE: | ||
res = self.invalidation_push_handler_func(response) | ||
else: | ||
res = self.pubsub_push_handler_func(response) | ||
if not push_request: | ||
return self._read_response( | ||
disable_decoding=disable_decoding, push_request=push_request | ||
) | ||
else: | ||
return res |
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 think it be better to test response[0] for pubsub as well (think its "message"?) and error out if its another type not supported.
if willing to force python 3.10, can use a switch/case/default stateent?
don't understand what pust_request is yet.
async def handle_push_response(self, response, disable_decoding, push_request): | ||
if response[0] in _INVALIDATION_MESSAGE: | ||
res = self.invalidation_push_handler_func(response) | ||
else: | ||
res = self.pubsub_push_handler_func(response) | ||
if not push_request: | ||
return await self._read_response( | ||
disable_decoding=disable_decoding, push_request=push_request | ||
) | ||
else: | ||
return res |
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.
confused why this logic seems to be duplicated from above?
* cache invalidations * isort * deamon thread * remove threads * delete comment * tests * skip if hiredis available * async * review comments * docstring * decode test * fix test * fix decode response test
* cache invalidations * isort * deamon thread * remove threads * delete comment * tests * skip if hiredis available * async * review comments * docstring * decode test * fix test * fix decode response test
* cache invalidations * isort * deamon thread * remove threads * delete comment * tests * skip if hiredis available * async * review comments * docstring * decode test * fix test * fix decode response test
Pull Request check-list
Please make sure to review and check all of these items:
NOTE: these things are not required to open a PR and can be done
afterwards / while the PR is open.
Description of change
Please provide a description of the change here.