Skip to content

Commit

Permalink
Ensure cloud and recorder backup platforms do not have to wait for th…
Browse files Browse the repository at this point in the history
…e import executor (home-assistant#133907)

* Ensure cloud and recorder backup platforms do not have to wait for the import executor

partially fixes home-assistant#133904

* backup.backup as well
  • Loading branch information
bdraco authored Dec 23, 2024
1 parent 253098d commit 3f441e7
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
4 changes: 4 additions & 0 deletions homeassistant/components/backup/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
from homeassistant.helpers.hassio import is_hassio
from homeassistant.helpers.typing import ConfigType

# Pre-import backup to avoid it being imported
# later when the import executor is busy and delaying
# startup
from . import backup # noqa: F401
from .agent import (
BackupAgent,
BackupAgentError,
Expand Down
9 changes: 8 additions & 1 deletion homeassistant/components/cloud/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,14 @@
from homeassistant.loader import bind_hass
from homeassistant.util.signal_type import SignalType

from . import account_link, http_api
# Pre-import backup to avoid it being imported
# later when the import executor is busy and delaying
# startup
from . import (
account_link,
backup, # noqa: F401
http_api,
)
from .client import CloudClient
from .const import (
CONF_ACCOUNT_LINK_SERVER,
Expand Down
9 changes: 8 additions & 1 deletion homeassistant/components/recorder/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,14 @@
from homeassistant.loader import bind_hass
from homeassistant.util.event_type import EventType

from . import entity_registry, websocket_api
# Pre-import backup to avoid it being imported
# later when the import executor is busy and delaying
# startup
from . import (
backup, # noqa: F401
entity_registry,
websocket_api,
)
from .const import ( # noqa: F401
CONF_DB_INTEGRITY_CHECK,
DOMAIN,
Expand Down

0 comments on commit 3f441e7

Please sign in to comment.