def parse_file(filename): f = open(filename) pkg = SeedsPackage() pkg.ID = 'FileSeedsLoader' pkg.seeds = [] while 1: line = f.readline() #print line if not line: break if line.find("#")==0: print "ignore line[%s]" % line continue seed = parse_line(line) if seed: pkg.seeds.append(seed) return pkg
def parse_file(filename): f = open(filename) pkg = SeedsPackage() pkg.ID = 'FileSeedsLoader' pkg.seeds = [] while 1: line = f.readline() #print line if not line: break if line.find("#") == 0: print "ignore line[%s]" % line continue seed = parse_line(line) if seed: pkg.seeds.append(seed) return pkg
def excute(self, seed_frequency): pkg = SeedsPackage() pkg.ID = self.name pkg.seeds = self.time_shared_seeds[seed_frequency] self.seed_service.add_seeds(self.name, pkg) self.loop_calls[seed_frequency].schedule(seed_frequency)
def execute(self, seed_frequency): pkg = SeedsPackage() pkg.ID = self.name pkg.seeds = self.timeslice_seeds[seed_frequency] self.seed_service.add_seeds(self.name, pkg) self.loop_calls[seed_frequency].schedule(seed_frequency)