Skip to content

Commit eaa0058

Browse files
fstagniweb-flow
authored andcommitted
sweep: #7195 do not try to insert nan values in AccountingDB
1 parent fc8e181 commit eaa0058

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/DIRAC/WorkloadManagementSystem/JobWrapper/JobWrapper.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1242,8 +1242,16 @@ def sendJobAccounting(self, status="", minorStatus=""):
12421242
self.log.info("EXECUTION_RESULT[CPU] in sendJobAccounting", cpuString)
12431243

12441244
utime, stime, cutime, cstime, elapsed = EXECUTION_RESULT["CPU"]
1245-
cpuTime = utime + stime + cutime + cstime
1246-
execTime = elapsed
1245+
try:
1246+
cpuTime = int(utime + stime + cutime + cstime)
1247+
except ValueError:
1248+
cpuTime = 0
1249+
1250+
try:
1251+
execTime = int(elapsed)
1252+
except ValueError:
1253+
execTime = 0
1254+
12471255
diskSpaceConsumed = getGlobbedTotalSize(os.path.join(self.root, str(self.jobID)))
12481256
# Fill the data
12491257
acData = {

0 commit comments

Comments
 (0)