mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-04-10 12:20:02 +00:00
crawler: tolerate low-resolution system clocks (i.e. windows)
This commit is contained in:
parent
106d31b112
commit
b9c4f4bdf6
@ -260,7 +260,7 @@ class ShareCrawler(service.MultiService):
|
||||
buckets, start_slice)
|
||||
self.last_complete_prefix_index = i
|
||||
self.save_state()
|
||||
if time.time() > start_slice + self.cpu_slice:
|
||||
if time.time() >= start_slice + self.cpu_slice:
|
||||
raise TimeSliceExceeded()
|
||||
# yay! we finished the whole cycle
|
||||
self.last_complete_prefix_index = -1
|
||||
@ -287,7 +287,7 @@ class ShareCrawler(service.MultiService):
|
||||
# time-consuming, but lets us avoid losing more than one bucket's
|
||||
# worth of progress.
|
||||
self.save_state()
|
||||
if time.time() > start_slice + self.cpu_slice:
|
||||
if time.time() >= start_slice + self.cpu_slice:
|
||||
raise TimeSliceExceeded()
|
||||
|
||||
def process_bucket(self, cycle, prefix, prefixdir, storage_index_b32):
|
||||
|
Loading…
x
Reference in New Issue
Block a user