mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +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,
|
||||
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)
|
||||
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user