chiark / gitweb /
Add +/-0.5s to wait times to make behaviour less clumpy
authorIan Jackson <ian@liberator.relativity.greenend.org.uk>
Wed, 13 Jan 2010 20:37:27 +0000 (20:37 +0000)
committerIan Jackson <ian@liberator.relativity.greenend.org.uk>
Wed, 13 Jan 2010 20:37:27 +0000 (20:37 +0000)
yoweb-scrape

index 3d9e857..b43e5a2 100755 (executable)
@@ -149,6 +149,8 @@ class Fetcher:
                                need_wait = max(need_wait, min_age - age)
                        min_age += 3
                        min_age *= 1.25
+               if need_wait > 0:
+                       need_wait += random.random() - 0.5
                return need_wait
 
        def _rate_limit_cache_clean(self, now):