-
Notifications
You must be signed in to change notification settings - Fork 507
enhance: Remove docker acquis internal timer use docker events #3598
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
enhance: Remove docker acquis internal timer use docker events #3598
Conversation
@LaurenceJJones: There are no 'kind' label on this PR. You need a 'kind' label to generate the release automatically.
DetailsI am a bot created to help the crowdsecurity developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the BirthdayResearch/oss-governance-bot repository. |
@LaurenceJJones: There are no area labels on this PR. You can add as many areas as you see fit.
DetailsI am a bot created to help the crowdsecurity developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the BirthdayResearch/oss-governance-bot repository. |
/kind enhancement |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3598 +/- ##
==========================================
- Coverage 60.82% 60.81% -0.02%
==========================================
Files 372 372
Lines 40841 40917 +76
==========================================
+ Hits 24843 24885 +42
- Misses 13943 13979 +36
+ Partials 2055 2053 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…to resurrect or else we wait until a event comes in which it may not
@LaurenceJJones let me know what you think of my change, I didn't test in docker but the only difference should be that it's applied to the initial connection. |
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.
lgtm
Instead of polling the api every one second, we can instead use the events hook in docker this is a continuous event stream that notify us of a container event. We filter for
start
anddie
which is crate and remove, to which we then trigger a function call to get all containers and update the state.This means this should be less intensive since we dont have to constantly poll for all containers and only do so when we actually get a notification to do so.