mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-24 07:06:41 +00:00
crawler: load state from the pickle in init, rather than waiting until startService, so get_state() can be called early
This commit is contained in:
parent
1077826357
commit
f934289d2d
@ -74,6 +74,7 @@ class ShareCrawler(service.MultiService):
|
||||
self.bucket_cache = (None, [])
|
||||
self.current_sleep_time = None
|
||||
self.next_wake_time = None
|
||||
self.load_state()
|
||||
|
||||
def get_progress(self):
|
||||
"""I return information about how much progress the crawler is
|
||||
@ -182,7 +183,6 @@ class ShareCrawler(service.MultiService):
|
||||
fileutil.move_into_place(tmpfile, self.statefile)
|
||||
|
||||
def startService(self):
|
||||
self.load_state()
|
||||
# arrange things to look like we were just sleeping, so
|
||||
# status/progress values work correctly
|
||||
self.sleeping_between_cycles = True
|
||||
|
Loading…
Reference in New Issue
Block a user