chiark
/
gitweb
/
~yarrgweb
/
ypp-sc-tools.web-test.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Add +/-0.5s to wait times to make behaviour less clumpy
[ypp-sc-tools.web-test.git]
/
yoweb-scrape
diff --git
a/yoweb-scrape
b/yoweb-scrape
index 3d9e857beaabe7d4622f3185cd6d4ff0c6c43350..b43e5a2ea728379e9d2fea85243b415fd3e23bb3 100755
(executable)
--- 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):