Fix StateStore persistence so restart state survives and dedupe state writes

This commit is contained in:
Andrew Emelyaneko
2026-10-31 21:45:16 +03:00
parent ce6759e6c2
commit c28ff0902b
+2
View File
@@ -66,6 +66,8 @@ class StateStore:
def mutate(self, updater) -> Dict[str, Any]: def mutate(self, updater) -> Dict[str, Any]:
with self.lock: with self.lock:
result = updater(self.data) result = updater(self.data)
if result is not None:
self.data = result
self._save() self._save()
return result return result