]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
crawler: tolerate low-resolution system clocks (i.e. windows)
authorBrian Warner <warner@lothar.com>
Sat, 21 Feb 2009 07:15:33 +0000 (00:15 -0700)
committerBrian Warner <warner@lothar.com>
Sat, 21 Feb 2009 07:15:33 +0000 (00:15 -0700)
src/allmydata/storage/crawler.py

index 89d4407daed6db59450696d35193aa7610df938b..df0f6e5d4cb25fa71ebd94d4e731fbf63972474e 100644 (file)
@@ -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):