Skip to content

Commit

Permalink
fix (TS): only look at requests in a final status to update FileTasks…
Browse files Browse the repository at this point in the history
… status
  • Loading branch information
chaen committed Jul 31, 2024
1 parent 61391bb commit bd4288d
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/DIRAC/TransformationSystem/Client/RequestTasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,22 @@ def getSubmittedFileStatus(self, fileDicts):

updateDict = {}
for requestID, lfnList in requestFiles.items():
# We only take request in final state to avoid race conditions
# https://github.com/DIRACGrid/DIRAC/issues/7116#issuecomment-2188740414
reqStatus = self.requestClient.getRequestStatus(requestID)
if not reqStatus["OK"]:
log = self._logVerbose if "not exist" in reqStatus["Message"] else self._logWarn
log(
"Failed to get request status",
reqStatus["Message"],
transID=transID,
method="getSubmittedFileStatus",
)
continue
reqStatus = reqStatus["Value"]
if reqStatus not in Request.FINAL_STATES:
continue

statusDict = self.requestClient.getRequestFileStatus(requestID, lfnList)
if not statusDict["OK"]:
log = self._logVerbose if "not exist" in statusDict["Message"] else self._logWarn
Expand Down

0 comments on commit bd4288d

Please sign in to comment.