def submit( self, jobNum ): """ Submit the first step of the workflow to the queue """ xmlPath = self.tempDirectory + str( jobNum ) + '.xml' job = Job( '', xmlPath ) job.submit() return S_OK()
def execute( self, jobNum ): """ Execute the first step of the workflow locally """ xmlPath = self.tempDirectory + str( jobNum ) + '.xml' job = Job( '', xmlPath ) job.execute() return S_OK()
def generate( self, jobNum ): """ Generate option files of all steps """ xmlPath = self.tempDirectory + str( jobNum ) + '.xml' job = Job( '', xmlPath ) job.generate() return S_OK()
def push(self, jobID): """ Submit the next step of the workflow """ xmlPath = self.tempDirectory + str(jobID) + '.xml' if not os.path.exists(xmlPath): return S_ERROR('Can not find workflow %s' % jobID) job = Job('', xmlPath) job.push() return S_OK()
def submit(self, jobID): """ Submit the first step of the workflow to the queue """ xmlPath = self.tempDirectory + str(jobID) + '.xml' if not os.path.exists(xmlPath): return S_ERROR('Can not find workflow %s' % jobID) job = Job('', xmlPath) job.submit() return S_OK()
def generate(self, jobID): """ Generate option files of all steps """ xmlPath = self.tempDirectory + str(jobID) + '.xml' if not os.path.exists(xmlPath): return S_ERROR('Can not find workflow %s' % jobID) job = Job('', xmlPath) job.generate() return S_OK()
def resubmit( self, infoDict ): """ Re-submit sub-jobs of a workflow infoDict{'jobNum':workflowID, 'stepNum':stepID, 'optionList':[optionNames...]} """ jobNum = infoDict['jobNum'] tempJob = Job( '', self.tempDirectory + str( jobNum ) + '.xml' ) stepNum = infoDict['stepNum'] opstep = tempJob.workflow.steps[int(stepNum)] stepName = opstep.name optionTempDirectory = '' for p in opstep.parameters: if p.name == 'optionFileDirectory': if p.value[-1] == '/': optionTempDirectory = p.value else: optionTempDirectory = p.value + '/' if not optionTempDirectory: optionDirectory = self.tempDirectory + 'workflowTemp/' + str( tempJob.jobNum ) + '/' + stepName + '/' else: optionDirectory = optionTempDirectory for optionFile in infoDict['optionList']: os.chdir( optionDirectory ) os.system( 'boss -q %s' % optionFile ) return S_OK()