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

Simplify startup logic #2006

Merged
merged 2 commits into from
Apr 24, 2021
Merged

Simplify startup logic #2006

merged 2 commits into from
Apr 24, 2021

Conversation

bdraco
Copy link
Contributor

@bdraco bdraco commented Apr 3, 2021

  • Ensure startup_tasks run after EVENT_HOMEASSISTANT_STARTED when restarting

Fixes #2005

- Ensure startup_tasks run after EVENT_HOMEASSISTANT_STARTED when restarting
@bdraco bdraco marked this pull request as ready for review April 3, 2021 21:29
Copy link
Member

@ludeeus ludeeus left a comment

Choose a reason for hiding this comment

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

Looks cleaner, but it does not really change anything? how is this fixing #2005 ?

@bdraco
Copy link
Contributor Author

bdraco commented Apr 4, 2021

config_type was always flow at startup so it would never got to the else which meant even thought we were not at running yet it would always use the call later logic.

@ludeeus
Copy link
Member

ludeeus commented Apr 4, 2021

But config_type is not always "flow"? if it is, that's a bug, it should be "yaml" when you configure with YAML.

@bdraco
Copy link
Contributor Author

bdraco commented Apr 6, 2021

But config_type is not always "flow"? if it is, that's a bug, it should be "yaml" when you configure with YAML.

It is flow if setup from the UI, and yaml if coming from yaml.

I think we don't want to delay startup regardless of it being yaml or flow??? When it is flow it would almost always (unless it was lucky enough for everything else to start within 5s) start tasks that would cause hass.async_block_till_done() in bootstrap.py to wait another ~10-20s before startup could proceed since it never waited for the started event to load up the tasks.

Sorry for the lack of clarity.

@bdraco
Copy link
Contributor Author

bdraco commented Apr 23, 2021

Any chance this could go out before beta? I'd like to get feedback on some of the startup performance improvements and this will cloud some of the profiles users will send.

@ludeeus
Copy link
Member

ludeeus commented Apr 23, 2021

There are a few more things that needs to get out, so will be with those, most likely on Sunday

@ludeeus ludeeus merged commit 88f7bd2 into hacs:main Apr 24, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Aug 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Startup is still blocked (just later on)
2 participants