diff --git a/src/DIRAC/WorkloadManagementSystem/JobWrapper/JobWrapper.py b/src/DIRAC/WorkloadManagementSystem/JobWrapper/JobWrapper.py index cbe05527662..a4fb4ea8ec8 100755 --- a/src/DIRAC/WorkloadManagementSystem/JobWrapper/JobWrapper.py +++ b/src/DIRAC/WorkloadManagementSystem/JobWrapper/JobWrapper.py @@ -1276,8 +1276,16 @@ def sendJobAccounting(self, status="", minorStatus=""): self.log.info("EXECUTION_RESULT[CPU] in sendJobAccounting", cpuString) utime, stime, cutime, cstime, elapsed = EXECUTION_RESULT["CPU"] - cpuTime = utime + stime + cutime + cstime - execTime = elapsed + try: + cpuTime = int(utime + stime + cutime + cstime) + except ValueError: + cpuTime = 0 + + try: + execTime = int(elapsed) + except ValueError: + execTime = 0 + diskSpaceConsumed = getGlobbedTotalSize(os.path.join(self.root, str(self.jobID))) # Fill the data acData = {