Skip to content

Commit 5187a9c

Browse files
committed
fix(JobStateUpdate): for staging, make sure the jobID is an integer
If jobID is not an integer, we never get a correct result, because the dictionary key is converted to an int, and then the string is not found and we do not get the attribute value back.
1 parent 200ec47 commit 5187a9c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/DIRAC/WorkloadManagementSystem/Service/JobStateUpdateHandler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def export_updateJobFromStager(cls, jobID, status):
6868
infoStr = None
6969
trials = 10
7070
for i in range(trials):
71-
result = cls.jobDB.getJobAttributes(jobID, ["Status"])
71+
result = cls.jobDB.getJobAttributes(int(jobID), ["Status"])
7272
if not result["OK"]:
7373
return result
7474
if not result["Value"]:

0 commit comments

Comments
 (0)