--- a/collector.py Sun May 08 22:58:56 2011 -0400
+++ b/collector.py Sun May 08 23:03:00 2011 -0400
@@ -113,7 +113,7 @@
if failure_rate and random.randrange(failure_rate) == 0:
info("worker failed")
return False
- time.sleep(workload)
+ time.sleep(workload * (1 + random.random()))
debug("worker send reply")
socket.send_multipart(address + [request[1], "DONE"])
@@ -174,7 +174,7 @@
workers = []
for url in proxy_urls:
for work in xrange(5):
- work = threading.Thread(target = connect_worker, args = (url, 1, 4500))
+ work = threading.Thread(target = connect_worker, args = (url, 1, 4800))
work.start()
workers.append(work)
time.sleep(20)