From 5187a9cab62f32cd12367f1cd6de4cf5ab274f72 Mon Sep 17 00:00:00 2001 From: Andre Sailer Date: Wed, 20 Dec 2023 14:53:19 +0100 Subject: [PATCH] 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. --- .../WorkloadManagementSystem/Service/JobStateUpdateHandler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DIRAC/WorkloadManagementSystem/Service/JobStateUpdateHandler.py b/src/DIRAC/WorkloadManagementSystem/Service/JobStateUpdateHandler.py index 5c621b50338..156389a985a 100755 --- a/src/DIRAC/WorkloadManagementSystem/Service/JobStateUpdateHandler.py +++ b/src/DIRAC/WorkloadManagementSystem/Service/JobStateUpdateHandler.py @@ -68,7 +68,7 @@ def export_updateJobFromStager(cls, jobID, status): infoStr = None trials = 10 for i in range(trials): - result = cls.jobDB.getJobAttributes(jobID, ["Status"]) + result = cls.jobDB.getJobAttributes(int(jobID), ["Status"]) if not result["OK"]: return result if not result["Value"]: