Skip to content
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

Merged
merged 3 commits into from
Feb 1, 2019

Conversation

edaniszewski
Copy link
Contributor

No description provided.

@codecov
Copy link

codecov bot commented Feb 1, 2019

Codecov Report

Merging #242 into master will decrease coverage by 0.08%.
The diff coverage is 81.81%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
synse/factory.py 86.36% <81.81%> (-1.78%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1de6a1e...1e3d3d6. Read the comment docs.

Copy link
Contributor

@marcoceppi marcoceppi left a 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()
Copy link
Contributor

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

Copy link
Contributor

@marcoceppi marcoceppi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Contributor

@KylerBurke KylerBurke left a 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

Copy link
Contributor

@lazypower lazypower left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐶 pile 👍

@edaniszewski edaniszewski merged commit 0245ca3 into master Feb 1, 2019
@edaniszewski edaniszewski deleted the etd/cache-rebuild branch February 1, 2019 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants