-
Notifications
You must be signed in to change notification settings - Fork 11
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 background task to periodically invalidate device cache #242
Conversation
Codecov Report
@@ Coverage Diff @@
## master #242 +/- ##
==========================================
- Coverage 87.83% 87.75% -0.09%
==========================================
Files 46 46
Lines 1381 1388 +7
==========================================
+ Hits 1213 1218 +5
- Misses 168 170 +2
Continue to review full report at Codecov.
|
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 traced clear_all_meta_caches
and there are only a few things that could cause a disruption (redis reconnecting, whatever aiocache does, etc)
synse/factory.py
Outdated
while True: | ||
await asyncio.sleep(5 * 60) # 5 minutes | ||
logger.info('task [periodic cache invalidation]: clearing device caches') | ||
await clear_all_meta_caches() |
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.
If this method raises an exception the background job will terminate. I'd be good to capture, filter, and bubble/log appropriately
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.
👍
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.
Unsolicited approval. Don't mind me, just lurking
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.
🐶 pile 👍
No description provided.