def buildWorkload(self, originalRequestURL): """ _buildWorkload_ Build a resubmission workload from a previous workload, it loads the workload and truncates it. """ #TODO remove the dependency on reqmgr1 if originalRequestURL == None: # reqmgr1 call (Due to reqmgr2 dependency imports here from WMCore.HTTPFrontEnd.RequestManager.ReqMgrWebTools import loadWorkload from WMCore.RequestManager.RequestDB.Interface.Request.GetRequest import getRequestByName originalRequest = getRequestByName(self.originalRequestName) helper = loadWorkload(originalRequest) else: # reqmgr2 call helper = WMWorkloadHelper() helper.loadSpecFromCouch(originalRequestURL, self.originalRequestName) helper.truncate(self.workloadName, self.initialTaskPath, self.acdcServer, self.acdcDatabase, self.collectionName) helper.ignoreOutputModules(self.ignoredOutputModules) return helper
def buildWorkload(self, originalRequestURL): """ _buildWorkload_ Build a resubmission workload from a previous workload, it loads the workload and truncates it. """ # TODO remove the dependency on reqmgr1 if originalRequestURL == None: # reqmgr1 call (Due to reqmgr2 dependency imports here from WMCore.HTTPFrontEnd.RequestManager.ReqMgrWebTools import loadWorkload from WMCore.RequestManager.RequestDB.Interface.Request.GetRequest import getRequestByName originalRequest = getRequestByName(self.originalRequestName) helper = loadWorkload(originalRequest) else: # reqmgr2 call helper = WMWorkloadHelper() helper.loadSpecFromCouch(originalRequestURL, self.originalRequestName) helper.truncate( self.workloadName, self.initialTaskPath, self.acdcServer, self.acdcDatabase, self.collectionName ) helper.ignoreOutputModules(self.ignoredOutputModules) return helper
def buildWorkload(self): """ _buildWorkload_ Build a resubmission workload from a previous workload, it loads the workload and truncates it. """ originalRequest = getRequestByName(self.originalRequestName) helper = loadWorkload(originalRequest) helper.truncate(self.requestName, self.initialTaskPath, self.acdcServer, self.acdcDatabase, self.collectionName) helper.ignoreOutputModules(self.ignoredOutputModules) return helper
def buildWorkload(self): """ _buildWorkload_ Build a resubmission workload from a previous workload, it loads the workload and truncates it. """ originalRequest = getRequestByName(self.originalRequestName) helper = loadWorkload(originalRequest) helper.truncate(self.requestName, self.initialTaskPath, self.acdcServer, self.acdcDatabase, self.collectionName) helper.ignoreOutputModules(self.ignoredOutputModules) return helper
def buildWorkload(self, originalRequestURL, arguments): """ _buildWorkload_ Build a resubmission workload from a previous workload, it loads the workload and truncates it. """ #TODO remove the dependency on reqmgr1 if originalRequestURL == None: # reqmgr1 call (Due to reqmgr2 dependency imports here from WMCore.HTTPFrontEnd.RequestManager.ReqMgrWebTools import loadWorkload from WMCore.RequestManager.RequestDB.Interface.Request.GetRequest import getRequestByName originalRequest = getRequestByName(self.originalRequestName) helper = loadWorkload(originalRequest) else: # reqmgr2 call helper = WMWorkloadHelper() helper.loadSpecFromCouch(originalRequestURL, self.originalRequestName) helper.truncate(self.workloadName, self.initialTaskPath, self.acdcServer, self.acdcDatabase, self.collectionName) helper.ignoreOutputModules(self.ignoredOutputModules) # override a couple of parameters, if provided by user if 'Memory' in arguments: helper.setMemory(arguments['Memory']) if 'Campaign' in arguments and not helper.getCampaign(): helper.setCampaign(arguments["Campaign"]) if 'RequestPriority' in arguments: helper.setPriority(arguments["RequestPriority"]) if 'TimePerEvent' in arguments: for task in helper.taskIterator(): task.setJobResourceInformation( timePerEvent=arguments["TimePerEvent"]) return helper
def buildWorkload(self, originalRequestURL, arguments): """ _buildWorkload_ Build a resubmission workload from a previous workload, it loads the workload and truncates it. """ #TODO remove the dependency on reqmgr1 if originalRequestURL == None: # reqmgr1 call (Due to reqmgr2 dependency imports here from WMCore.HTTPFrontEnd.RequestManager.ReqMgrWebTools import loadWorkload from WMCore.RequestManager.RequestDB.Interface.Request.GetRequest import getRequestByName originalRequest = getRequestByName(self.originalRequestName) helper = loadWorkload(originalRequest) else: # reqmgr2 call helper = WMWorkloadHelper() helper.loadSpecFromCouch(originalRequestURL, self.originalRequestName) helper.truncate(self.workloadName, self.initialTaskPath, self.acdcServer, self.acdcDatabase, self.collectionName) helper.ignoreOutputModules(self.ignoredOutputModules) # override a couple of parameters, if provided by user if 'Memory' in arguments: helper.setMemory(arguments['Memory']) if 'Campaign' in arguments and not helper.getCampaign(): helper.setCampaign(arguments["Campaign"]) if 'RequestPriority' in arguments: helper.setPriority(arguments["RequestPriority"]) if 'TimePerEvent' in arguments: for task in helper.taskIterator(): task.setJobResourceInformation(timePerEvent=arguments["TimePerEvent"]) return helper