incubator-tashi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strou...@apache.org
Subject svn commit: r1244840 - /incubator/tashi/branches/stroucki-slotsbug/src/tashi/client/tashi-client.py
Date Thu, 16 Feb 2012 03:36:16 GMT
Author: stroucki
Date: Thu Feb 16 03:36:16 2012
New Revision: 1244840

URL: http://svn.apache.org/viewvc?rev=1244840&view=rev
Log:
tashi-client: change min to max

Modified:
    incubator/tashi/branches/stroucki-slotsbug/src/tashi/client/tashi-client.py

Modified: incubator/tashi/branches/stroucki-slotsbug/src/tashi/client/tashi-client.py
URL: http://svn.apache.org/viewvc/incubator/tashi/branches/stroucki-slotsbug/src/tashi/client/tashi-client.py?rev=1244840&r1=1244839&r2=1244840&view=diff
==============================================================================
--- incubator/tashi/branches/stroucki-slotsbug/src/tashi/client/tashi-client.py (original)
+++ incubator/tashi/branches/stroucki-slotsbug/src/tashi/client/tashi-client.py Thu Feb 16
03:36:16 2012
@@ -166,7 +166,7 @@ def getSlots(cores, memory):
 			continue
 		countbycores = int((h.cores - h.usedCores) / cores)
 		countbymemory = int((h.memory - h.usedMemory) / memory)
-		count += min(0, min(countbycores, countbymemory))
+		count += max(0, min(countbycores, countbymemory))
 
 	print "%d" % (count),
 	print (lambda:"instances", lambda:"instance")[count == 1](),



Mime
View raw message