Skip to content

Commit

Permalink
fix (TS): set Problematic files that are only partially processed
Browse files Browse the repository at this point in the history
  • Loading branch information
chaen committed Jul 31, 2024
1 parent bd4288d commit 0cde547
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/DIRAC/RequestManagementSystem/Client/ReqClient.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ def getRequestStatus(self, requestID):
self.log.debug("getRequestStatus: attempting to get status for '%d' request." % requestID)
requestStatus = self._getRPC().getRequestStatus(requestID)
if not requestStatus["OK"]:
self.log.error(
self.log.verbose(
"getRequestStatus: unable to get status for request",
": '%d' %s" % (requestID, requestStatus["Message"]),
)
Expand Down
21 changes: 15 additions & 6 deletions src/DIRAC/TransformationSystem/Client/RequestTasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,10 +395,19 @@ def getSubmittedFileStatus(self, fileDicts):
transID=transID,
method="getSubmittedFileStatus",
)
else:
for lfn, newStatus in statusDict["Value"].items():
if newStatus == "Done":
updateDict[lfn] = TransformationFilesStatus.PROCESSED
elif newStatus == "Failed":
updateDict[lfn] = TransformationFilesStatus.PROBLEMATIC
continue

# If we are here, it means the Request is in a final state.
# In principle, you could expect everyfile also be in a final state
# but this is only true for simple Request.
# Hence, the file is marked as PROCESSED only if the file status is Done
# In any other case, we mark it problematic
# This is dangerous though, as complex request may not be re-entrant
# We would need a way to make sure it is safe to do so.
# See https://github.com/DIRACGrid/DIRAC/issues/7116 for more details
for lfn, newStatus in statusDict["Value"].items():
if newStatus == "Done":
updateDict[lfn] = TransformationFilesStatus.PROCESSED
else:
updateDict[lfn] = TransformationFilesStatus.PROBLEMATIC
return S_OK(updateDict)

0 comments on commit 0cde547

Please sign in to comment.