diff --git a/src/DIRAC/DataManagementSystem/Client/FTS3Job.py b/src/DIRAC/DataManagementSystem/Client/FTS3Job.py index 9e597c1bb57..bcf604e8c66 100644 --- a/src/DIRAC/DataManagementSystem/Client/FTS3Job.py +++ b/src/DIRAC/DataManagementSystem/Client/FTS3Job.py @@ -206,6 +206,11 @@ def monitor(self, context=None, ftsServer=None, ucert=None): if file_state in FTS3File.FTS_FINAL_STATES: filesStatus[file_id]["ftsGUID"] = None + # If the file is failed, check if it is recoverable + if file_state in FTS3File.FTS_FAILED_STATES: + if not fileDict.get("Recoverable", True): + filesStatus[file_id]["status"] = "Defunct" + # If the file is not in a final state, but the job is, we return an error # FTS can have inconsistencies where the FTS Job is in a final state # but not all the files.