1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Make database access in the eventloop raise an exception (#71547)

This commit is contained in:
J. Nick Koston
2022-05-09 15:22:08 -05:00
committed by GitHub
parent 2560d35f1c
commit 222baa53dd
7 changed files with 66 additions and 32 deletions

View File

@@ -692,10 +692,9 @@ async def _async_init_recorder_component(hass, add_config=None):
if recorder.CONF_COMMIT_INTERVAL not in config:
config[recorder.CONF_COMMIT_INTERVAL] = 0
with patch(
"homeassistant.components.recorder.ALLOW_IN_MEMORY_DB",
True,
), patch("homeassistant.components.recorder.migration.migrate_schema"):
with patch("homeassistant.components.recorder.ALLOW_IN_MEMORY_DB", True), patch(
"homeassistant.components.recorder.migration.migrate_schema"
):
assert await async_setup_component(
hass, recorder.DOMAIN, {recorder.DOMAIN: config}
)