Skip to content

Commit

Permalink
fix host name again
Browse files Browse the repository at this point in the history
  • Loading branch information
kpedro88 committed Dec 22, 2017
1 parent b7501c7 commit 6a29268
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions python/manageJobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,12 @@ def __init__(self, result, schedd):
if self.sites==classad.Value.Undefined: self.sites = ""
self.matched = result["MATCH_EXP_JOB_GLIDEIN_CMSSite"] if "MATCH_EXP_JOB_GLIDEIN_CMSSite" in result.keys() else ""
if self.matched==classad.Value.Undefined: self.matched = ""
self.machine = result["RemoteHost"] if "RemoteHost" in result.keys() else ""
if "RemoteHost" in result.keys():
self.machine = result["RemoteHost"]
elif "LastRemoteHost" in result.keys():
self.machine = result["LastRemoteHost"]
else:
self.machine = ""
if self.machine==classad.Value.Undefined: self.matched = ""
if len(self.machine)>0: self.machine = self.machine.split('@')[-1]

Expand All @@ -56,7 +61,7 @@ def getJobs(options, scheddurl=""):

# get info for selected jobs
jobs = []
for result in schedd.xquery(constraint,["ClusterId","ProcId","HoldReason","Out","Args","JobStatus","ServerTime","ChirpCMSSWLastUpdate","DESIRED_Sites","MATCH_EXP_JOB_GLIDEIN_CMSSite","RemoteHost"]):
for result in schedd.xquery(constraint,["ClusterId","ProcId","HoldReason","Out","Args","JobStatus","ServerTime","ChirpCMSSWLastUpdate","DESIRED_Sites","MATCH_EXP_JOB_GLIDEIN_CMSSite","RemoteHost","LastRemoteHost"]):
# check greps
checkstring = result["Out"]
if "HoldReason" in result.keys(): checkstring += " "+result["HoldReason"]
Expand Down

0 comments on commit 6a29268

Please sign in to comment.