mirror of
https://github.com/home-assistant/core.git
synced 2025-07-30 02:38:10 +02:00
Create an issue when database backups fail because the system runs out of resources (#109020)
This commit is contained in:
@ -470,6 +470,24 @@ def _async_create_mariadb_range_index_regression_issue(
|
||||
)
|
||||
|
||||
|
||||
@callback
|
||||
def async_create_backup_failure_issue(
|
||||
hass: HomeAssistant,
|
||||
local_start_time: datetime,
|
||||
) -> None:
|
||||
"""Create an issue when the backup fails because we run out of resources."""
|
||||
ir.async_create_issue(
|
||||
hass,
|
||||
DOMAIN,
|
||||
"backup_failed_out_of_resources",
|
||||
is_fixable=False,
|
||||
severity=ir.IssueSeverity.CRITICAL,
|
||||
learn_more_url="https://www.home-assistant.io/integrations/recorder",
|
||||
translation_key="backup_failed_out_of_resources",
|
||||
translation_placeholders={"start_time": local_start_time.strftime("%H:%M:%S")},
|
||||
)
|
||||
|
||||
|
||||
def setup_connection_for_dialect(
|
||||
instance: Recorder,
|
||||
dialect_name: str,
|
||||
|
Reference in New Issue
Block a user