mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
Use recorder threadpool in WS recorder/get_statistics_metadata (#68615)
This commit is contained in:
parent
3068c9c9d3
commit
cbf5b5ead5
@ -82,7 +82,8 @@ async def ws_get_statistics_metadata(
|
|||||||
hass: HomeAssistant, connection: websocket_api.ActiveConnection, msg: dict
|
hass: HomeAssistant, connection: websocket_api.ActiveConnection, msg: dict
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Get metadata for a list of statistic_ids."""
|
"""Get metadata for a list of statistic_ids."""
|
||||||
statistic_ids = await hass.async_add_executor_job(
|
instance: Recorder = hass.data[DATA_INSTANCE]
|
||||||
|
statistic_ids = await instance.async_add_executor_job(
|
||||||
list_statistic_ids, hass, msg.get("statistic_ids")
|
list_statistic_ids, hass, msg.get("statistic_ids")
|
||||||
)
|
)
|
||||||
connection.send_result(msg["id"], statistic_ids)
|
connection.send_result(msg["id"], statistic_ids)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user