Пример #1
0
def closeOutStep0Requests(url, workflows):
    for workflow in workflows:
        datasets = phedexSubscription.outputdatasetsWorkflow(url, workflow)
        closeOutWorkflow = True
        if getRequestTeam(
                url,
                workflow) != 'analysis':  #If request is not in special queue
            for dataset in datasets:
                closeOutDataset = False
                Percentage = PercentageCompletion(url, workflow, dataset)
                PhedexSubscription = CustodialMoveSubscriptionCreated(dataset)
                if PhedexSubscription != False:
                    site = PhedexSubscription
                    TransPercen = TransferPercentage(url, dataset, site)
                duplicate = dbsTest.duplicateLumi(dataset)
                correctLumis = dbsTest.checkCorrectLumisEventGEN(dataset)
                if Percentage >= float(
                        0.90
                ) and PhedexSubscription != False and not duplicate and correctLumis:
                    closeOutDataset = True
                else:
                    closeOutDataset = False
                closeOutWorkflow = closeOutWorkflow and closeOutDataset
                print '| %80s | %100s | %4s | %5s| %3s | %5s|%5s| ' % (
                    workflow, dataset, str(int(
                        Percentage * 100)), str(PhedexSubscription),
                    str(correctLumis), duplicate, closeOutDataset)
            if closeOutWorkflow:
                phedexSubscription.closeOutWorkflow(url, workflow)

    print '-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------'
def closeOutMonterCarloRequests(url, workflows):
	for workflow in workflows:
		datasets=phedexSubscription.outputdatasetsWorkflow(url, workflow)
		closeOutWorkflow=True
		if getRequestTeam(url, workflow)!='analysis':#If request is not in special queue
			for dataset in datasets:
				ClosePercentage=0.90
				#if 'SMS' in dataset:
				#	ClosePercentage=1
				closeOutDataset=True
				Percentage=PercentageCompletion(url, workflow, dataset)
				PhedexSubscription=CustodialMoveSubscriptionCreated(dataset)
				TransPercen=0
				closedBlocks=False
				if PhedexSubscription!=False:
					site=PhedexSubscription
					TransPercen=TransferPercentage(url, dataset, site)
				duplicate=True
				if PhedexSubscription!=False and Percentage>=float(0.9):
					duplicate=dbsTest.duplicateLumi(dataset)
					closedBlocks = True #dbsTest.hasAllBlocksClosed(dataset)
				if Percentage>=float(ClosePercentage) and PhedexSubscription!=False and not duplicate:
					closeOutDataset=True
				else:
		 			closeOutDataset=False
				closeOutWorkflow=closeOutWorkflow and closeOutDataset
				print '| %80s | %100s | %4s | %5s| %3s | %5s|%5s| %5s|' % (workflow, dataset,str(int(Percentage*100)), str(PhedexSubscription), str(int(TransPercen*100)), duplicate, closedBlocks, closeOutDataset)
			if closeOutWorkflow:
				phedexSubscription.closeOutWorkflow(url, workflow)
		
	print'-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------' 				    
def closeOutStep0Requests(url, workflows):
	for workflow in workflows:
		#print workflow
		datasets=phedexSubscription.outputdatasetsWorkflow(url, workflow)
		closeOutWorkflow=True
		if getRequestTeam(url, workflow)!='analysis':#If request is not in special queue
			for dataset in datasets:
				closeOutDataset=False
				Percentage=PercentageCompletion(url, workflow, dataset)
				PhedexSubscription=CustodialMoveSubscriptionCreated(dataset)
				if PhedexSubscription!=False:
					site=PhedexSubscription
					TransPercen=TransferPercentage(url, dataset, site)
				duplicate=dbsTest.duplicateLumi(dataset)
				correctLumis=dbsTest.checkCorrectLumisEventGEN(dataset)
				if Percentage>=float(0.95) and PhedexSubscription!=False and not duplicate and correctLumis:
					closeOutDataset=True
				else:
		 			closeOutDataset=False
				closeOutWorkflow=closeOutWorkflow and closeOutDataset
				print '| %80s | %100s | %4s | %5s| %3s | %5s| %5s| ' % (workflow, dataset,str(int(Percentage*100)), str(PhedexSubscription), str(correctLumis), duplicate, closeOutDataset)
			if closeOutWorkflow:
				phedexSubscription.closeOutWorkflow(url, workflow)
		
	print'-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------'
Пример #4
0
def closeOutMonterCarloRequests(url, workflows):
	for workflow in workflows:
		datasets=phedexSubscription.outputdatasetsWorkflow(url, workflow)
		closeOutWorkflow=True
		if getRequestTeam(url, workflow)!='analysis':#If request is not in special queue
			for dataset in datasets:
				ClosePercentage=0.93
				if 'SMS' in dataset:
					ClosePercentage=1
				closeOutDataset=True
				Percentage=PercentageCompletion(url, workflow, dataset)
				PhedexSubscription=CustodialMoveSubscriptionCreated(dataset)
				TransPercen=0
				if PhedexSubscription!=False:
					site=PhedexSubscription
					TransPercen=TransferPercentage(url, dataset, site)
				duplicate=True
				if PhedexSubscription!=False and Percentage>=float(0.9):
					duplicate=dbsTest.duplicateLumi(dataset)
				if Percentage>=float(ClosePercentage) and PhedexSubscription!=False and not duplicate:
					closeOutDataset=True
				else:
		 			closeOutDataset=False
				closeOutWorkflow=closeOutWorkflow and closeOutDataset
				print '| %80s | %100s | %4s | %5s| %3s | %5s|%5s| ' % (workflow, dataset,str(int(Percentage*100)), str(PhedexSubscription), str(int(TransPercen*100)), duplicate, closeOutDataset)
			if closeOutWorkflow:
				phedexSubscription.closeOutWorkflow(url, workflow)
		
	print'-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------'