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 latest frigate version to stats endpoints #3038

Merged

Conversation

NickM-27
Copy link
Sponsor Collaborator

@NickM-27 NickM-27 commented Apr 1, 2022

This is in order to support the efforts of blakeblackshear/frigate-hass-integration#235, frigate will check github for the latest version tag once on startup so that services (and potentially frigate itself in the future) can be aware if there is an update.

I found that the stats_tracking was the "cleanest" way I could think of to pull the value only once and have it be included in both http and mqtt calls. If there is a better solution happy to reorganize this 👍

@drinfernoo
Copy link
Contributor

What if Frigate isn't restarted for an indeterminate amount of time? It will only check for updates whenever it is?

@NickM-27
Copy link
Sponsor Collaborator Author

NickM-27 commented Apr 1, 2022

What if Frigate isn't restarted for an indeterminate amount of time? It will only check for updates whenever it is?

I spent some time thinking about it, but I would rather not spend time / resources polling since this should only consider full releases and not betas which means there would be a lot of redundant checks relative to the number of checks that found a new version. And since it is just supporting a HASS entity and nothing too important.

If this is deemed more important than I think it is, there's a few ways I can think to have it poll once a day.

frigate/stats.py Outdated Show resolved Hide resolved
frigate/stats.py Outdated Show resolved Hide resolved
@blakeblackshear blakeblackshear merged commit 58c3285 into blakeblackshear:release-0.11.0 Apr 11, 2022
@NickM-27 NickM-27 deleted the latest-version branch April 11, 2022 14:05
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

3 participants