Move async_migration_in_progress (#59087)

This commit is contained in:
Erik Montnemery
2021-11-05 10:40:56 +01:00
committed by GitHub
parent 8cc2f3b7a4
commit 470b01e4ce
9 changed files with 43 additions and 46 deletions

View File

@@ -4,12 +4,11 @@
from homeassistant.core import HomeAssistant
async def async_migration_in_progress(hass: HomeAssistant) -> bool:
def async_migration_in_progress(hass: HomeAssistant) -> bool:
"""Check to see if a recorder migration is in progress."""
if "recorder" not in hass.config.components:
return False
from homeassistant.components import ( # pylint: disable=import-outside-toplevel
recorder,
)
# pylint: disable-next=import-outside-toplevel
from homeassistant.components import recorder
return await recorder.async_migration_in_progress(hass)
return recorder.util.async_migration_in_progress(hass)