Fix StateStore persistence so restart state survives and dedupe state writes
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user