diff --git a/src/DIRAC/Resources/Computing/AREXComputingElement.py b/src/DIRAC/Resources/Computing/AREXComputingElement.py index 84ad2b6d8a0..66171217a7b 100755 --- a/src/DIRAC/Resources/Computing/AREXComputingElement.py +++ b/src/DIRAC/Resources/Computing/AREXComputingElement.py @@ -893,8 +893,10 @@ 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 ea816e68a88..db1683107ca 100644 --- a/src/DIRAC/WorkloadManagementSystem/Utilities/RemoteRunner.py +++ b/src/DIRAC/WorkloadManagementSystem/Utilities/RemoteRunner.py @@ -103,7 +103,11 @@ def execute(self, command, workingDirectory=".", numberOfProcessors=1, cleanRemo return result self.log.info("The output has been retrieved and declared complete") - # Clean job in the remote resource + # Clean up the job (local files not needed anymore) + os.remove(self.checkSumOutput) + os.remove(self.executable) + + # Remove the job from the CE if cleanRemoteJob: if not (result := workloadCE.cleanJob(jobID))["OK"]: self.log.warn("Failed to clean the output remotely", result["Message"])