Skip to content

Commit 1a9a5e3

Browse files
authored
Merge pull request #7196 from DIRACGridBot/cherry-pick-2-6fe6baff3-integration
[sweep:integration] do not try to insert nan values in AccountingDB
2 parents fc8e181 + eaa0058 commit 1a9a5e3

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)