Skip to content

Commit

Permalink
Worker number related to connection limit
Browse files Browse the repository at this point in the history
  • Loading branch information
shortcutme committed Aug 15, 2016
1 parent af4447e commit 954c6bc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Worker/WorkerManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,10 @@ def onPeers(self):
self.startWorkers()

def getMaxWorkers(self):
if len(self.tasks) < 30:
return 10
if len(self.tasks) > 100:
return config.connected_limit * 2
else:
return 20
return config.connected_limit

# Add new worker
def addWorker(self, peer):
Expand Down

0 comments on commit 954c6bc

Please sign in to comment.