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 sensor re-registration on app version change for offline server #3380

Merged

Conversation

jpelgrom
Copy link
Member

@jpelgrom jpelgrom commented Feb 28, 2023

Summary

Prevent the SensorWorker runs from taking a long time if a server is offline when the app version changes due to re-registration of all sensors (~15 min, runs sequentially), by skipping these re-registrations if one fails with an exception that indicates the server can't be reached.

This isn't a new issue but more obvious with multiserver as it is more likely to have a server that is frequently offline/unreachable. The app version doesn't change with debug builds so this was spotted by @dshokouhi with updates on the internal test track :)

Screenshots

n/a

Link to pull request in Documentation repository

n/a

Any other notes

 - Prevent the sensor worker runs from taking a long time when the app version changes if a server is offline due to reregistration of all servers (~15 min), by skipping these re-registrations if it fails with an exception that indicates offline/network issues.
Copy link
Member

@dshokouhi dshokouhi left a comment

Choose a reason for hiding this comment

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

Looks good to me, thank you for the quick fix :)

@JBassett JBassett enabled auto-merge (squash) March 1, 2023 17:08
@JBassett JBassett merged commit f5d2b97 into home-assistant:master Mar 1, 2023
@jpelgrom jpelgrom deleted the app-update-registration-offline branch March 1, 2023 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants