fix statefile load, increasing cleanup time
This commit is contained in:
parent
e1b1ec195f
commit
1896f33c77
@ -183,7 +183,7 @@ class Database:
|
|||||||
if self._state_filename:
|
if self._state_filename:
|
||||||
nursery.start_soon(self._run_statefile)
|
nursery.start_soon(self._run_statefile)
|
||||||
while True:
|
while True:
|
||||||
await trio.sleep(10) # sleep 15 minutes
|
await trio.sleep(60) # sleep 15 minutes
|
||||||
_logger.debug("Running database cleanup")
|
_logger.debug("Running database cleanup")
|
||||||
self._drop_outdated()
|
self._drop_outdated()
|
||||||
if self._changed_since_last_cleanup:
|
if self._changed_since_last_cleanup:
|
||||||
@ -279,7 +279,7 @@ class Database:
|
|||||||
except google.protobuf.message.DecodeError as e:
|
except google.protobuf.message.DecodeError as e:
|
||||||
_logger.error(f"Failed to decode chunk from statefile, trying next one: {e}")
|
_logger.error(f"Failed to decode chunk from statefile, trying next one: {e}")
|
||||||
continue
|
continue
|
||||||
for state in states:
|
for state in states.states:
|
||||||
errors = 0
|
errors = 0
|
||||||
try:
|
try:
|
||||||
pu.received_mac_state(state)
|
pu.received_mac_state(state)
|
||||||
|
Loading…
Reference in New Issue
Block a user