mirror of
https://github.com/home-assistant/core.git
synced 2025-08-06 14:15:12 +02:00
Avoid recorder thread crashing (#21668)
This commit is contained in:
@@ -318,6 +318,10 @@ class Recorder(threading.Thread):
|
|||||||
CONNECT_RETRY_WAIT)
|
CONNECT_RETRY_WAIT)
|
||||||
tries += 1
|
tries += 1
|
||||||
|
|
||||||
|
except exc.SQLAlchemyError:
|
||||||
|
updated = True
|
||||||
|
_LOGGER.exception("Error saving event: %s", event)
|
||||||
|
|
||||||
if not updated:
|
if not updated:
|
||||||
_LOGGER.error("Error in database update. Could not save "
|
_LOGGER.error("Error in database update. Could not save "
|
||||||
"after %d tries. Giving up", tries)
|
"after %d tries. Giving up", tries)
|
||||||
|
Reference in New Issue
Block a user