def parse_args(self): self.instances_per_file = self.params.decoys_per_file self.instances_per_job = self.params.decoys_per_job self.extra['application_release'] = self.params.rosetta_release self.extra['number_of_decoys_to_create'] = self.params.decoys_per_job self.extra['collect'] = self.params.collect try: existing_file(self.params.flags_file) except Exception, ex: gc3libs.log.error("Invalid flags file `%s`: please supply a valid flags file by adding the option `-f PATH`" % self.params.flags_file) raise ex
def new_tasks(self, extra): while self.params.args: # get next chunk of arguments if '::' in self.params.args: up_to = self.params.args.index('::') args = self.params.args[:up_to] self.params.args = self.params.args[(up_to+1):] else: args = self.params.args self.params.args = [] # process it assert len(args) > 2 funcname = args[0] values = args[1] inputfiles = args[2:] for inputfile in inputfiles: assert existing_file(inputfile) # add tasks to session for task in self.new_tasks1(funcname, values, inputfiles, **extra): yield task
def new_tasks(self, extra): while self.params.args: # get next chunk of arguments if '::' in self.params.args: up_to = self.params.args.index('::') args = self.params.args[:up_to] self.params.args = self.params.args[(up_to + 1):] else: args = self.params.args self.params.args = [] # process it assert len(args) > 2 funcname = args[0] values = args[1] inputfiles = args[2:] for inputfile in inputfiles: assert existing_file(inputfile) # add tasks to session for task in self.new_tasks1(funcname, values, inputfiles, **extra): yield task