示例#1
0
 def handleAnnounce(self, **kwargs):
     """ Handler for announcing requests """
     requests = self.requestNamesFromCheckboxes(kwargs)
     # the distinction good/bad datasets was based upon contacting
     # wrong DBS url so it was always giving rubbish,
     # perhaps the entire page is just not used at all
     datasets = []
     goodDatasets = []
     badDatasets = []
     for requestName in requests:
         WMCore.Lexicon.identifier(requestName)
         Utilities.changeStatus(requestName,
                                'announced',
                                wmstatUrl=self.wmstatWriteURL,
                                acdcUrl=self.acdcURL)
         datasets.extend(Utilities.getOutputForRequest(requestName))
     for dataset in datasets:
         # was needed for the DBS call to wrong DBS URL
         # check code before 2013-04-04
         #toks = dataset.split('/')
         #data = {'primary_ds_name': toks[0], 'processed_ds_name': toks[1],
         #        'data_tier_name': toks[2], 'is_dataset_valid': 1}
         goodDatasets.append(dataset)
     return self.templatepage("Announce",
                              requests=requests,
                              goodDatasets=goodDatasets,
                              badDatasets=badDatasets)
示例#2
0
 def handleAnnounce(self, **kwargs):
     """ Handler for announcing requests """
     requests = self.requestNamesFromCheckboxes(kwargs)
     datasets = []
     goodDatasets = []
     badDatasets = []
     for requestName in requests:
         WMCore.Lexicon.identifier(requestName)
         ChangeState.changeRequestStatus(requestName, 'announced', wmstatUrl = self.wmstatWriteURL)
         datasets.extend(Utilities.getOutputForRequest(requestName))
     for dataset in datasets:
         try:
             toks = dataset.split('/')
             data = {'primary_ds_name': toks[0], 'processed_ds_name': toks[1], 
                     'data_tier_name': toks[2], 'is_dataset_valid': 1}
             dbsSender.post('/DBSWriter/datasets', data=data)
             goodDatasets.append(dataset)
         except:
             logging.warning("Could not update dataset into DBS:" +dataset)
             badDatasets.append(dataset)
     return self.templatepage("Announce", requests=requests, 
                              goodDatasets=goodDatasets,
                              badDatasets=badDatasets)
示例#3
0
 def handleAnnounce(self, **kwargs):
     """ Handler for announcing requests """
     requests = self.requestNamesFromCheckboxes(kwargs)
     datasets = []
     goodDatasets = []
     badDatasets = []
     for requestName in requests:
         WMCore.Lexicon.identifier(requestName)
         ChangeState.changeRequestStatus(requestName, 'announced', wmstatUrl = self.wmstatWriteURL)
         datasets.extend(Utilities.getOutputForRequest(requestName))
     for dataset in datasets:
         try:
             toks = dataset.split('/')
             data = {'primary_ds_name': toks[0], 'processed_ds_name': toks[1],
                     'data_tier_name': toks[2], 'is_dataset_valid': 1}
             dbsSender.post('/DBSWriter/datasets', data=data)
             goodDatasets.append(dataset)
         except:
             logging.warning("Could not update dataset into DBS:" +dataset)
             badDatasets.append(dataset)
     return self.templatepage("Announce", requests=requests,
                              goodDatasets=goodDatasets,
                              badDatasets=badDatasets)
示例#4
0
 def getOutputForRequest(self, requestName):
     """Return the datasets produced by this request."""
     return Utilities.getOutputForRequest(requestName)
示例#5
0
 def getOutputForRequest(self, requestName):
     """Return the datasets produced by this request."""
     return Utilities.getOutputForRequest(requestName)