diff --git a/src/DIRAC/Resources/Computing/AREXComputingElement.py b/src/DIRAC/Resources/Computing/AREXComputingElement.py index 59f24431632..18815da59f6 100755 --- a/src/DIRAC/Resources/Computing/AREXComputingElement.py +++ b/src/DIRAC/Resources/Computing/AREXComputingElement.py @@ -898,10 +898,8 @@ def getJobOutput(self, jobID, workingDirectory=None): if remoteOutput == f"{stamp}.out": with open(localOutput) as f: stdout = f.read() - os.unlink(localOutput) if remoteOutput == f"{stamp}.err": with open(localOutput) as f: stderr = f.read() - os.unlink(localOutput) return S_OK((stdout, stderr)) diff --git a/src/DIRAC/WorkloadManagementSystem/Utilities/RemoteRunner.py b/src/DIRAC/WorkloadManagementSystem/Utilities/RemoteRunner.py index fc2396f6a7f..03d5425defd 100644 --- a/src/DIRAC/WorkloadManagementSystem/Utilities/RemoteRunner.py +++ b/src/DIRAC/WorkloadManagementSystem/Utilities/RemoteRunner.py @@ -128,6 +128,8 @@ def execute(self, command, workingDirectory=".", numberOfProcessors=1, cleanRemo self.log.info("The output has been retrieved and declared complete") # Clean up the job (local files not needed anymore) + os.remove(f"{stamp}.out") + os.remove(f"{stamp}.err") os.remove(self.checkSumOutput) os.remove(self.executable)