mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-19 11:16:24 +00:00
storage.expirer: handle upgrades better
This commit is contained in:
parent
a68ad06254
commit
df3f7f93e0
@ -61,6 +61,10 @@ class LeaseCheckingCrawler(ShareCrawler):
|
||||
# get started: unit tests do this
|
||||
so_far = self.create_empty_cycle_dict()
|
||||
self.state.setdefault("cycle-to-date", so_far)
|
||||
# in case we upgrade the code while a cycle is in progress, update
|
||||
# the keys individually
|
||||
for k in self.state["cycle-to-date"]:
|
||||
self.state["cycle-to-date"].setdefault(k, so_far[k])
|
||||
|
||||
# initialize history
|
||||
if not os.path.exists(self.historyfile):
|
||||
|
Loading…
Reference in New Issue
Block a user