From: Ian Jackson Date: Wed, 13 Jan 2010 20:37:27 +0000 (+0000) Subject: Add +/-0.5s to wait times to make behaviour less clumpy X-Git-Tag: 6.5.0~6 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.db-live.git;a=commitdiff_plain;h=8a8bfb9e7cea82cc9d3f73aad297cbacea7719e5 Add +/-0.5s to wait times to make behaviour less clumpy --- diff --git a/yoweb-scrape b/yoweb-scrape index 3d9e857..b43e5a2 100755 --- a/yoweb-scrape +++ b/yoweb-scrape @@ -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):