Skip to content

Commit

Permalink
Merge pull request #7435 from andresailer/80_fixJobIDs
Browse files Browse the repository at this point in the history
[8.0] fix(JobDB): getJobParameters and getJobsAttributes use integer jobIDs…
  • Loading branch information
fstagni committed Feb 2, 2024
2 parents 0f7e63b + b4f9486 commit 74fe559
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/DIRAC/WorkloadManagementSystem/DB/JobDB.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ def getJobAttributes(self, jobID, attrList=None):
result = self.getJobsAttributes([jobID], attrList)
if not result["OK"]:
return result
return S_OK(result["Value"].get(jobID, {}))
return S_OK(result["Value"].get(int(jobID), {}))

#############################################################################
def getJobAttribute(self, jobID, attribute):
Expand All @@ -270,7 +270,7 @@ def getJobParameter(self, jobID, parameter):
result = self.getJobParameters(jobID, [parameter])
if not result["OK"]:
return result
return S_OK(result.get("Value", {}).get(jobID, {}).get(parameter))
return S_OK(result.get("Value", {}).get(int(jobID), {}).get(parameter))

#############################################################################
def getJobOptParameter(self, jobID, parameter):
Expand Down Expand Up @@ -1140,7 +1140,7 @@ def rescheduleJob(self, jobID):
result = JobMonitoringClient().getJobParameters(jobID)
if result["OK"]:
parDict = result["Value"]
for key, value in parDict.get(jobID, {}).items():
for key, value in parDict.get(int(jobID), {}).items():
result = self.setAtticJobParameter(jobID, key, value, rescheduleCounter - 1)
if not result["OK"]:
break
Expand Down

0 comments on commit 74fe559

Please sign in to comment.