Skip to content
Snippets Groups Projects
Commit d25a1753 authored by Todor Trendafilov Ivanov's avatar Todor Trendafilov Ivanov
Browse files

Job Time Tuning {--} - Reading the runMode from puppet && fixing a typo in radCondorConfig.

parent b9fda462
No related branches found
No related tags found
1 merge request!53Job Time Tuning {--} Puppet configurable runMode/{min|max}corrFactor && multi functional correctFactor
......@@ -105,7 +105,7 @@ def readCondorConfig(condorParam, paramType):
logging.exception("Could not convert %s to %s. Exception: %s" % (condorParam, paramType, e))
elif paramType == 'str':
try:
returnParam == str(htcondor.param.get(condorParam))
returnParam = str(htcondor.param.get(condorParam))
except Exception as e:
returnParam = False
logging.exception("Could not convert %s to %s. Exception: %s" % (condorParam, paramType, e))
......@@ -186,7 +186,7 @@ class JobTimeTuner:
'static': self.statCorr
}
# todo - to make the function reference here and pass directly self.corrMethod to corrFactor
# done - to make the function reference here and pass directly self.corrMethod to corrFactor
# The default method to be used from crrFactor:
self.corrMethodAlias = readCondorConfig("JAT_TIMETUNER_corrMethod", 'str')
if not self.corrMethodAlias:
......@@ -195,6 +195,15 @@ class JobTimeTuner:
logging.debug("corrMethodAlias = %s" % self.corrMethodAlias)
logging.debug("corrMethod = %s" % self.corrMethod)
# Default runMode: 'tag' || 'real'
# in tagMode we edit only EstimatedMaxWallTimeMins
# in realMode we edit also MaxWallTimeMins
self.runMode = readCondorConfig("JAT_TIMETUNER_runMode", 'str')
if not self.runMode:
self.runMode = 'tag'
self.realMode = False
if self.runMode == 'real': self.realMode = True
logging.debug("runMode = %s" % self.runMode)
def getTaskStat(self, task, user, qtype):
......@@ -248,7 +257,7 @@ class JobTimeTuner:
routerEntry["TargetUniverse"] = 5
routerEntry["Requirements"] = classad.ExprTree(str(requirementsString))
routerEntry["set_EstimatedWallTimeMins"] = newTime
# routerEntry["set_MaxWallTimeMins"] = newTime
if self.realMode: routerEntry["set_MaxWallTimeMins"] = newTime
routerEntry["set_EstimatedWallTimeJobCount"] = jobCount
routerEntry["set_HasBeenRouted"] = False;
routerEntry["set_HasBeenTimingTuned"] = True;
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment