Skip to content

Commit f422ec6

Browse files
committed
fix: Explicitly convert job IDs to numeric strings in JobDB
1 parent 94f19d7 commit f422ec6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • src/DIRAC/WorkloadManagementSystem/DB

src/DIRAC/WorkloadManagementSystem/DB/JobDB.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def getJobParameters(self, jobID, paramList=None):
130130
return ret
131131
paramNameList.append(ret["Value"])
132132
cmd = "SELECT JobID, Name, Value FROM JobParameters WHERE JobID IN ({}) AND Name IN ({})".format(
133-
",".join(jobIDList),
133+
",".join(str(int(j)) for j in jobIDList),
134134
",".join(paramNameList),
135135
)
136136
result = self._query(cmd)
@@ -560,7 +560,7 @@ def setJobAttributes(self, jobID, attrNames, attrValues, update=False, myDate=No
560560
if not attr:
561561
return S_ERROR("JobDB.setAttributes: Nothing to do")
562562

563-
cmd = f"UPDATE Jobs SET {', '.join(attr)} WHERE JobID in ( {', '.join(jIDList)} )"
563+
cmd = f"UPDATE Jobs SET {', '.join(attr)} WHERE JobID in ( {', '.join(str(int(j)) for j in jIDList)} )"
564564

565565
if myDate:
566566
cmd += f" AND LastUpdateTime < {myDate}"

0 commit comments

Comments
 (0)