glideinFrontendLib.log_files.logActivity("Match") #glideinFrontendLib.log_files.logDebug("realcount: %s\n\n" % glideinFrontendLib.countRealRunning(elementDescript.merged_data['MatchExprCompiledObj'],condorq_dict_running,glidein_dict)) glideinFrontendLib.log_files.logActivity("Counting") pipe_ids={} for dt in condorq_dict_types.keys()+['Real','Glidein']: # will make calculations in parallel,using multiple processes r,w=os.pipe() pid=os.fork() if pid==0: # this is the child... return output as a pickled object via the pipe os.close(r) try: if dt=='Real': out=glideinFrontendLib.countRealRunning(elementDescript.merged_data['MatchExprCompiledObj'],condorq_dict_running,glidein_dict) elif dt=='Glidein': count_status_multi={} for glideid in glidein_dict.keys(): request_name=glideid[1] count_status_multi[request_name]={} for st in status_dict_types.keys(): c=glideinFrontendLib.getClientCondorStatus(status_dict_types[st]['dict'],frontend_name,group_name,request_name) count_status_multi[request_name][st]=glideinFrontendLib.countCondorStatus(c) out=count_status_multi else: c,p,h=glideinFrontendLib.countMatch(elementDescript.merged_data['MatchExprCompiledObj'],condorq_dict_types[dt]['dict'],glidein_dict) t=glideinFrontendLib.countCondorQ(condorq_dict_types[dt]['dict']) out=(c,p,h,t)