From: Brian Warner Date: Sat, 21 Feb 2009 07:15:33 +0000 (-0700) Subject: crawler: tolerate low-resolution system clocks (i.e. windows) X-Git-Tag: allmydata-tahoe-1.4.0~159 X-Git-Url: https://git.rkrishnan.org/?a=commitdiff_plain;h=b9c4f4bdf610063e2dfbb796352023e3a9bb4d25;p=tahoe-lafs%2Ftahoe-lafs.git crawler: tolerate low-resolution system clocks (i.e. windows) --- diff --git a/src/allmydata/storage/crawler.py b/src/allmydata/storage/crawler.py index 89d4407d..df0f6e5d 100644 --- a/src/allmydata/storage/crawler.py +++ b/src/allmydata/storage/crawler.py @@ -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):