r7339 - dumbhippo/trunk/firehose/firehose/jobs



Author: walters
Date: 2008-02-22 16:18:50 -0600 (Fri, 22 Feb 2008)
New Revision: 7339

Modified:
   dumbhippo/trunk/firehose/firehose/jobs/master.py
   dumbhippo/trunk/firehose/firehose/jobs/poller.py
Log:
Fix taskset count computation logic error, and avoid using python 2.5 urlparse bits.


Modified: dumbhippo/trunk/firehose/firehose/jobs/master.py
===================================================================
--- dumbhippo/trunk/firehose/firehose/jobs/master.py	2008-02-22 21:23:11 UTC (rev 7338)
+++ dumbhippo/trunk/firehose/firehose/jobs/master.py	2008-02-22 22:18:50 UTC (rev 7339)
@@ -322,11 +322,11 @@
                 except IndexError, e:
                     break
                 if i >= MAX_TASKSET_SIZE:
+                    tasksets.append(taskset)                    
+                    taskset = []
+                    i = 0
                     if len(tasksets) >= MAX_TASKSET_WORKERS:
-                        break
-                    tasksets.append(taskset)
-                    taskset = []
-                    i = 0                    
+                        break                    
                 else:
                     i += 1
                 eligible = qtask.eligibility < taskset_limit

Modified: dumbhippo/trunk/firehose/firehose/jobs/poller.py
===================================================================
--- dumbhippo/trunk/firehose/firehose/jobs/poller.py	2008-02-22 21:23:11 UTC (rev 7338)
+++ dumbhippo/trunk/firehose/firehose/jobs/poller.py	2008-02-22 22:18:50 UTC (rev 7339)
@@ -80,7 +80,7 @@
         def parsequery(s):
             args = s.split('&')
             return dict(map(lambda x: map(urllib.unquote, x.split('=',1)), args))
-        masterhost = parsequery(urlparse.urlparse(self.path).query)['masterhost']
+        masterhost = parsequery(urlparse.urlparse(self.path)[4])['masterhost']
         taskids = simplejson.load(self.rfile)
         poller = TaskPoller.get()
         poller.poll_tasks(taskids, masterhost)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]