From efaf75f2e6c81563c36cfa4334095a371e6c3028 Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Mon, 29 Jul 2024 11:38:21 +0200 Subject: [PATCH] Rename recorder INTEGRATION_PLATFORMS_RUN_IN_RECORDER_THREAD (#122758) --- homeassistant/components/recorder/__init__.py | 7 ++----- homeassistant/components/recorder/const.py | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/homeassistant/components/recorder/__init__.py b/homeassistant/components/recorder/__init__.py index 41fa8db5814..8564827d839 100644 --- a/homeassistant/components/recorder/__init__.py +++ b/homeassistant/components/recorder/__init__.py @@ -33,7 +33,7 @@ from .const import ( # noqa: F401 CONF_DB_INTEGRITY_CHECK, DOMAIN, INTEGRATION_PLATFORM_COMPILE_STATISTICS, - INTEGRATION_PLATFORMS_RUN_IN_RECORDER_THREAD, + INTEGRATION_PLATFORM_METHODS, SQLITE_URL_PREFIX, SupportedDialect, ) @@ -189,10 +189,7 @@ async def _async_setup_integration_platform( """Process a recorder platform.""" # If the platform has a compile_statistics method, we need to # add it to the recorder queue to be processed. - if any( - hasattr(platform, _attr) - for _attr in INTEGRATION_PLATFORMS_RUN_IN_RECORDER_THREAD - ): + if any(hasattr(platform, _attr) for _attr in INTEGRATION_PLATFORM_METHODS): instance.queue_task(AddRecorderPlatformTask(domain, platform)) await async_process_integration_platforms(hass, DOMAIN, _process_recorder_platform) diff --git a/homeassistant/components/recorder/const.py b/homeassistant/components/recorder/const.py index c7dba18cad9..066ae938971 100644 --- a/homeassistant/components/recorder/const.py +++ b/homeassistant/components/recorder/const.py @@ -66,7 +66,7 @@ INTEGRATION_PLATFORM_COMPILE_STATISTICS = "compile_statistics" INTEGRATION_PLATFORM_VALIDATE_STATISTICS = "validate_statistics" INTEGRATION_PLATFORM_LIST_STATISTIC_IDS = "list_statistic_ids" -INTEGRATION_PLATFORMS_RUN_IN_RECORDER_THREAD = { +INTEGRATION_PLATFORM_METHODS = { INTEGRATION_PLATFORM_COMPILE_STATISTICS, INTEGRATION_PLATFORM_VALIDATE_STATISTICS, INTEGRATION_PLATFORM_LIST_STATISTIC_IDS,