mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Freeze integration setup timeout for recorder during non-live data migration (#131998)
This commit is contained in:
parent
8878d0f0e1
commit
598ce1f3b0
@ -740,7 +740,7 @@ class Recorder(threading.Thread):
|
|||||||
self.schema_version = schema_status.current_version
|
self.schema_version = schema_status.current_version
|
||||||
|
|
||||||
# Do non-live data migration
|
# Do non-live data migration
|
||||||
migration.migrate_data_non_live(self, self.get_session, schema_status)
|
self._migrate_data_offline(schema_status)
|
||||||
|
|
||||||
# Non-live migration is now completed, remaining steps are live
|
# Non-live migration is now completed, remaining steps are live
|
||||||
self.migration_is_live = True
|
self.migration_is_live = True
|
||||||
@ -916,6 +916,13 @@ class Recorder(threading.Thread):
|
|||||||
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
def _migrate_data_offline(
|
||||||
|
self, schema_status: migration.SchemaValidationStatus
|
||||||
|
) -> None:
|
||||||
|
"""Migrate data."""
|
||||||
|
with self.hass.timeout.freeze(DOMAIN):
|
||||||
|
migration.migrate_data_non_live(self, self.get_session, schema_status)
|
||||||
|
|
||||||
def _migrate_schema_offline(
|
def _migrate_schema_offline(
|
||||||
self, schema_status: migration.SchemaValidationStatus
|
self, schema_status: migration.SchemaValidationStatus
|
||||||
) -> tuple[bool, migration.SchemaValidationStatus]:
|
) -> tuple[bool, migration.SchemaValidationStatus]:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user