Skip to content

Commit

Permalink
Merge pull request #8 from vlimant/multiple_output
Browse files Browse the repository at this point in the history
aggregate for multiple outputs
  • Loading branch information
anorkus committed Aug 21, 2014
2 parents f3ab977 + 52feb6f commit d587ada
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tools/statsMonitoring.py
Original file line number Diff line number Diff line change
Expand Up @@ -1247,6 +1247,19 @@ def parallel_test(arguments,force=False):
#do the expensive procedure rarely or for request which have been update more than 2 days ago
print "\tSumming for",req_name
status,evts,openN=get_status_nevts_from_dbs(pdmv_request_dict["pdmv_dataset_name"])
## aggregate number of events for all output datasets
pdmv_request_dict['pdmv_dataset_statuses'] = {}
for other_ds in pdmv_request_dict['pdmv_dataset_list']:
if other_ds == pdmv_request_dict["pdmv_dataset_name"]:
other_status,other_evts,other_openN = status,evts,openN
else:
other_status,other_evts,other_openN = get_status_nevts_from_dbs( other_ds )
pdmv_request_dict['pdmv_dataset_statuses'][other_ds] = {
'pdmv_status_in_DAS' : other_status,
'pdmv_evts_in_DAS' : other_evts,
'pdmv_open_evts_in_DAS' : other_openN
}

if status:
print "\t\tUpdating %s %s %s"%( status,evts,openN )
pdmv_request_dict["pdmv_status_in_DAS"]=status
Expand Down

0 comments on commit d587ada

Please sign in to comment.