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

Improve poll performance and fix permissions #46

Merged
merged 4 commits into from
Aug 2, 2024

Conversation

tsagadar
Copy link
Collaborator

@tsagadar tsagadar commented Aug 2, 2024

Closes #44 : no longer updating device metrics twice per poll.

Also fixes permission parsing.

Metrics generated two queries for each poll. Moving device metrics code to
the model as there it is known if count changed or not.

Now three queries are used for each poll (assuming device in "rollout" mode)
1. Load device (usually not cached when poll starts)
2. Update last_seen etc. on device
3. Retrieve target firmware (if any)
Copy link
Collaborator

@b-rowan b-rowan left a comment

Choose a reason for hiding this comment

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

LGTM.

@tsagadar tsagadar merged commit 914a584 into UpstreamDataInc:master Aug 2, 2024
@tsagadar tsagadar deleted the mm/misc branch August 2, 2024 13:56
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.

Improve poll performance by reducing DB load
2 participants