From b9c4f4bdf610063e2dfbb796352023e3a9bb4d25 Mon Sep 17 00:00:00 2001 From: Brian Warner <warner@lothar.com> Date: Sat, 21 Feb 2009 00:15:33 -0700 Subject: [PATCH] crawler: tolerate low-resolution system clocks (i.e. windows) --- src/allmydata/storage/crawler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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): -- 2.45.2