Skip to content

Commit

Permalink
fix: do not try to insert nan values in AccountingDB
Browse files Browse the repository at this point in the history
  • Loading branch information
fstagni committed Sep 11, 2023
1 parent c8be7f8 commit 487a2ad
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/DIRAC/WorkloadManagementSystem/JobWrapper/JobWrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit 487a2ad

Please sign in to comment.