Skip to content

Commit 62b006e

Browse files
author
artiedaj
committed
Merge pull request #29 from lucacopa/another_fix
Another fix to match the expected format by SSB
2 parents 4d89024 + 5956dd7 commit 62b006e

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

WFM_Input_DashBoard/WFMonDBShort.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -316,13 +316,13 @@ def handleDict(dict, description, date, hour, server):
316316

317317
# add site/scheduler jobs per type to 'description''type' file
318318
file = open('./'+description+type+'.txt', 'a')
319-
file.write( "%s %s\t%s\t%s\t%s\t%s%s%s\n" % (date, hour, entry, str(int(dict[entry][type])), 'green', site_link, entry.replace(".","_").strip(), endpoint_entry ))
319+
file.write( "%s %s\t%s\t%s\t%s\t%s%s%s\n" % (date, hour, entry, str(int(dict[entry][type])), 'green', site_link, entry, endpoint_entry ))
320320

321321
lineSite += " %10s |" % int(sum)
322322

323323
# add site/scheduler total jobs to 'description'Total file
324324
file = open('./'+description+"Total"+'.txt', 'a')
325-
file.write( "%s %s\t%s\t%s\t%s\t%s%s%s\n" % (date, hour, entry, str(int(sum)), 'green', site_link, entry.replace(".","_").strip(), endpoint_entry ))
325+
file.write( "%s %s\t%s\t%s\t%s\t%s%s%s\n" % (date, hour, entry, str(int(sum)), 'green', site_link, entry, endpoint_entry ))
326326

327327
print lineSite
328328

@@ -375,7 +375,7 @@ def jsonDict(json_name,currTime,date,hour,key):
375375
sumRunning += running[entry][type]
376376

377377
json_entry = dict()
378-
json_entry[key] = str(entry).replace(".","_").strip()
378+
json_entry[key] = str(entry)
379379
json_entry["Pending"] = str(int(sumPending))
380380
json_entry["TimeDate"] = str(currTime.strip())
381381
json_entry["Running"] = str(int(sumRunning))
@@ -450,7 +450,7 @@ def main():
450450
print "INFO: Handling condor_q on collector: %s scheduler: %s" % (col, sched)
451451

452452
if not sched in overview_running_vobox.keys():
453-
addVoBox(sched)
453+
addVoBox(sched.replace(".","_").strip())
454454

455455
for line in out.split('\n') :
456456
if line == "" :
@@ -492,10 +492,10 @@ def main():
492492

493493
if status == "2":
494494
increaseRunning(siteToExtract[0],type) # I assume one job can only run at one site
495-
increaseRunningVoBox(sched,type)
495+
increaseRunningVoBox(sched.replace(".","_").strip(),type)
496496
elif status == "1":
497497
temp_pending.append([type,siteToExtract])
498-
increasePendingVoBox(sched,type)
498+
increasePendingVoBox(sched.replace(".","_").strip(),type)
499499
else: # We do not care about jobs in another status (condor job status: https://htcondor-wiki.cs.wisc.edu/index.cgi/wiki?p=MagicNumbers)
500500
continue
501501
print "INFO: Full condor status pooling is done"

0 commit comments

Comments
 (0)