mirror of
https://github.com/home-assistant/core.git
synced 2025-07-26 22:57:17 +00:00
Rename recorder INTEGRATION_PLATFORMS_RUN_IN_RECORDER_THREAD (#122758)
This commit is contained in:
parent
ca430f0e7b
commit
efaf75f2e6
@ -33,7 +33,7 @@ from .const import ( # noqa: F401
|
|||||||
CONF_DB_INTEGRITY_CHECK,
|
CONF_DB_INTEGRITY_CHECK,
|
||||||
DOMAIN,
|
DOMAIN,
|
||||||
INTEGRATION_PLATFORM_COMPILE_STATISTICS,
|
INTEGRATION_PLATFORM_COMPILE_STATISTICS,
|
||||||
INTEGRATION_PLATFORMS_RUN_IN_RECORDER_THREAD,
|
INTEGRATION_PLATFORM_METHODS,
|
||||||
SQLITE_URL_PREFIX,
|
SQLITE_URL_PREFIX,
|
||||||
SupportedDialect,
|
SupportedDialect,
|
||||||
)
|
)
|
||||||
@ -189,10 +189,7 @@ async def _async_setup_integration_platform(
|
|||||||
"""Process a recorder platform."""
|
"""Process a recorder platform."""
|
||||||
# If the platform has a compile_statistics method, we need to
|
# If the platform has a compile_statistics method, we need to
|
||||||
# add it to the recorder queue to be processed.
|
# add it to the recorder queue to be processed.
|
||||||
if any(
|
if any(hasattr(platform, _attr) for _attr in INTEGRATION_PLATFORM_METHODS):
|
||||||
hasattr(platform, _attr)
|
|
||||||
for _attr in INTEGRATION_PLATFORMS_RUN_IN_RECORDER_THREAD
|
|
||||||
):
|
|
||||||
instance.queue_task(AddRecorderPlatformTask(domain, platform))
|
instance.queue_task(AddRecorderPlatformTask(domain, platform))
|
||||||
|
|
||||||
await async_process_integration_platforms(hass, DOMAIN, _process_recorder_platform)
|
await async_process_integration_platforms(hass, DOMAIN, _process_recorder_platform)
|
||||||
|
@ -66,7 +66,7 @@ INTEGRATION_PLATFORM_COMPILE_STATISTICS = "compile_statistics"
|
|||||||
INTEGRATION_PLATFORM_VALIDATE_STATISTICS = "validate_statistics"
|
INTEGRATION_PLATFORM_VALIDATE_STATISTICS = "validate_statistics"
|
||||||
INTEGRATION_PLATFORM_LIST_STATISTIC_IDS = "list_statistic_ids"
|
INTEGRATION_PLATFORM_LIST_STATISTIC_IDS = "list_statistic_ids"
|
||||||
|
|
||||||
INTEGRATION_PLATFORMS_RUN_IN_RECORDER_THREAD = {
|
INTEGRATION_PLATFORM_METHODS = {
|
||||||
INTEGRATION_PLATFORM_COMPILE_STATISTICS,
|
INTEGRATION_PLATFORM_COMPILE_STATISTICS,
|
||||||
INTEGRATION_PLATFORM_VALIDATE_STATISTICS,
|
INTEGRATION_PLATFORM_VALIDATE_STATISTICS,
|
||||||
INTEGRATION_PLATFORM_LIST_STATISTIC_IDS,
|
INTEGRATION_PLATFORM_LIST_STATISTIC_IDS,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user