Permalink
Browse files

load balancing rules update

  • Loading branch information...
1 parent ee52dd8 commit 0987c299037db1d896b7bd21496041c0b0dd1981 @bianjiang committed Nov 11, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 tweetf0rm/scheduler.py
View
@@ -139,9 +139,9 @@ def balancing_load(self):
logger.info("load balancing process started...")
cmds = []
controls = []
- for i in range(int(0.3 * min_qsize)):
+ for i in range(int(0.3 * (max_qsize - min_qsize))):
cmd = self.crawlers[max_crawler_id]['crawler_queue'].get()
- if (cmd in control_cmds):
+ if (cmd['cmd'] in control_cmds):
controls.append(cmd)
else:
cmds.append(cmd)

0 comments on commit 0987c29

Please sign in to comment.