Skip to content

Commit 487a2ad

Browse files
committed
fix: do not try to insert nan values in AccountingDB
1 parent c8be7f8 commit 487a2ad

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
@@ -1276,8 +1276,16 @@ def sendJobAccounting(self, status="", minorStatus=""):
12761276
self.log.info("EXECUTION_RESULT[CPU] in sendJobAccounting", cpuString)
12771277

12781278
utime, stime, cutime, cstime, elapsed = EXECUTION_RESULT["CPU"]
1279-
cpuTime = utime + stime + cutime + cstime
1280-
execTime = elapsed
1279+
try:
1280+
cpuTime = int(utime + stime + cutime + cstime)
1281+
except ValueError:
1282+
cpuTime = 0
1283+
1284+
try:
1285+
execTime = int(elapsed)
1286+
except ValueError:
1287+
execTime = 0
1288+
12811289
diskSpaceConsumed = getGlobbedTotalSize(os.path.join(self.root, str(self.jobID)))
12821290
# Fill the data
12831291
acData = {

0 commit comments

Comments
 (0)