Support non-live database migration (#72433)
* Support non-live database migration * Tweak startup order, add test * Address review comments * Fix typo * Clarify comment about promoting dependencies * Tweak * Fix merge mistake * Fix some tests * Fix additional test * Fix additional test * Adjust tests * Improve test coverage
This commit is contained in:
parent
9d0a252ca7
commit
fd6ffef52f
20 changed files with 993 additions and 61 deletions
|
@ -17,7 +17,7 @@ from .statistics import (
|
|||
list_statistic_ids,
|
||||
validate_statistics,
|
||||
)
|
||||
from .util import async_migration_in_progress, get_instance
|
||||
from .util import async_migration_in_progress, async_migration_is_live, get_instance
|
||||
|
||||
_LOGGER: logging.Logger = logging.getLogger(__package__)
|
||||
|
||||
|
@ -193,6 +193,7 @@ def ws_info(
|
|||
|
||||
backlog = instance.backlog if instance else None
|
||||
migration_in_progress = async_migration_in_progress(hass)
|
||||
migration_is_live = async_migration_is_live(hass)
|
||||
recording = instance.recording if instance else False
|
||||
thread_alive = instance.is_alive() if instance else False
|
||||
|
||||
|
@ -200,6 +201,7 @@ def ws_info(
|
|||
"backlog": backlog,
|
||||
"max_backlog": MAX_QUEUE_BACKLOG,
|
||||
"migration_in_progress": migration_in_progress,
|
||||
"migration_is_live": migration_is_live,
|
||||
"recording": recording,
|
||||
"thread_running": thread_alive,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue