From 1896f33c77c1d191e1f8b0f7203b37cac9aea21f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20B=C3=BChler?= Date: Thu, 7 Apr 2022 17:18:09 +0200 Subject: [PATCH] fix statefile load, increasing cleanup time --- src/capport/database.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/capport/database.py b/src/capport/database.py index 197b588..d4195be 100644 --- a/src/capport/database.py +++ b/src/capport/database.py @@ -183,7 +183,7 @@ class Database: if self._state_filename: nursery.start_soon(self._run_statefile) while True: - await trio.sleep(10) # sleep 15 minutes + await trio.sleep(60) # sleep 15 minutes _logger.debug("Running database cleanup") self._drop_outdated() if self._changed_since_last_cleanup: @@ -279,7 +279,7 @@ class Database: except google.protobuf.message.DecodeError as e: _logger.error(f"Failed to decode chunk from statefile, trying next one: {e}") continue - for state in states: + for state in states.states: errors = 0 try: pu.received_mac_state(state)