mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 08:47:57 +00:00
Mark recorder system_health session read_only (#89842)
This commit is contained in:
parent
ab4a726e6c
commit
aa72b48725
@ -33,7 +33,7 @@ def async_register(
|
||||
def _get_db_stats(instance: Recorder, database_name: str) -> dict[str, Any]:
|
||||
"""Get the stats about the database."""
|
||||
db_stats: dict[str, Any] = {}
|
||||
with session_scope(session=instance.get_session()) as session:
|
||||
with session_scope(session=instance.get_session(), read_only=True) as session:
|
||||
if (
|
||||
(dialect_name := instance.dialect_name)
|
||||
and (get_size := DIALECT_TO_GET_SIZE.get(dialect_name))
|
||||
|
Loading…
x
Reference in New Issue
Block a user