Permalink
Browse files
load balancing rules update
- Loading branch information...
Showing
with
2 additions
and
2 deletions.
-
+2
−2
tweetf0rm/scheduler.py
|
|
@@ -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