mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 01:07:10 +00:00
Create component setup tasks eagerly in bootstrap (#111511)
This saves waiting one iteration of the event loop
This commit is contained in:
parent
d5e1934942
commit
145ce183d0
@ -622,7 +622,9 @@ async def async_setup_multi_components(
|
|||||||
domains_not_yet_setup = domains - hass.config.components
|
domains_not_yet_setup = domains - hass.config.components
|
||||||
futures = {
|
futures = {
|
||||||
domain: hass.async_create_task(
|
domain: hass.async_create_task(
|
||||||
async_setup_component(hass, domain, config), f"setup component {domain}"
|
async_setup_component(hass, domain, config),
|
||||||
|
f"setup component {domain}",
|
||||||
|
eager_start=True,
|
||||||
)
|
)
|
||||||
for domain in domains_not_yet_setup
|
for domain in domains_not_yet_setup
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user