def hashString(self): """ Return a sha512 hexdigest of the command string after all whitespace is stripped This is meant to be a unique ID for the command line to be submitted. """ return utils.hashString(self.command)
def _submit(self,job,deps=set()): """Submit the given job Returns the biowulf job id of the submitted job""" if(len(deps)>0): print deps job.params='-W depend=afterany:%s' % (":".join(deps)) if(job in self.submitLog): return [self.submitLog[job]] else: if(len(deps)==0): job.uptodate=False tmp = job.submit() if(tmp==UPTODATE): return(set()) self.submitLog[job]=tmp[0] with open(self._jobdb,'a') as f: f.write("%s\t%s\t%s\n" %(str(self.submitLog[job]),str(job.name), utils.hashString(job.command))) return [self.submitLog[job]]