From 459f4305756d03b7bd5b83a43be28cf15a8ab294 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Wed, 28 Feb 2024 01:41:03 -1000 Subject: [PATCH] Use eager tasks in a few more places in bootstrap (#111697) I missed a few of the ones that run before we call _async_set_up_integrations as I was too focused on the timings of that function --- homeassistant/bootstrap.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/homeassistant/bootstrap.py b/homeassistant/bootstrap.py index 175facbd0e7..428220685eb 100644 --- a/homeassistant/bootstrap.py +++ b/homeassistant/bootstrap.py @@ -308,16 +308,16 @@ async def async_load_base_functionality(hass: core.HomeAssistant) -> None: entity.async_setup(hass) template.async_setup(hass) await asyncio.gather( - area_registry.async_load(hass), - device_registry.async_load(hass), - entity_registry.async_load(hass), - floor_registry.async_load(hass), - issue_registry.async_load(hass), - label_registry.async_load(hass), + create_eager_task(area_registry.async_load(hass)), + create_eager_task(device_registry.async_load(hass)), + create_eager_task(entity_registry.async_load(hass)), + create_eager_task(floor_registry.async_load(hass)), + create_eager_task(issue_registry.async_load(hass)), + create_eager_task(label_registry.async_load(hass)), hass.async_add_executor_job(_cache_uname_processor), - template.async_load_custom_templates(hass), - restore_state.async_load(hass), - hass.config_entries.async_initialize(), + create_eager_task(template.async_load_custom_templates(hass)), + create_eager_task(restore_state.async_load(hass)), + create_eager_task(hass.config_entries.async_initialize()), ) @@ -340,7 +340,7 @@ async def async_from_config_dict( if not all( await asyncio.gather( *( - async_setup_component(hass, domain, config) + create_eager_task(async_setup_component(hass, domain, config)) for domain in CORE_INTEGRATIONS ) )