mirror of
https://github.com/home-assistant/core.git
synced 2025-07-11 23:37:18 +00:00
Skip recorder commit if there is nothing to do (#49614)
This commit is contained in:
parent
3e3cd0981d
commit
376b787e4d
@ -666,6 +666,9 @@ class Recorder(threading.Thread):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
def _commit_event_session_or_retry(self):
|
def _commit_event_session_or_retry(self):
|
||||||
|
"""Commit the event session if there is work to do."""
|
||||||
|
if not self.event_session.new and not self.event_session.dirty:
|
||||||
|
return
|
||||||
tries = 1
|
tries = 1
|
||||||
while tries <= self.db_max_retries:
|
while tries <= self.db_max_retries:
|
||||||
try:
|
try:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user