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 f32cbea
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/DIRAC/WorkloadManagementSystem/JobWrapper/JobWrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import time
import datetime
import shutil
import math
import threading
import tarfile
import glob
Expand Down Expand Up @@ -1276,8 +1277,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 f32cbea

Please sign in to comment.