better publish threads
This commit is contained in:
parent
30e234ade8
commit
10c6d4a7a3
1 changed files with 1 additions and 1 deletions
|
@ -219,7 +219,7 @@ class Site:
|
||||||
|
|
||||||
random.shuffle(peers)
|
random.shuffle(peers)
|
||||||
event_done = gevent.event.AsyncResult()
|
event_done = gevent.event.AsyncResult()
|
||||||
for i in range(min(1+len(self.peers), limit)/2):
|
for i in range(min(len(self.peers), limit, 5)): # Max 5 thread
|
||||||
publisher = gevent.spawn(self.publisher, inner_path, peers, published, limit, event_done)
|
publisher = gevent.spawn(self.publisher, inner_path, peers, published, limit, event_done)
|
||||||
publishers.append(publisher)
|
publishers.append(publisher)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue