def __init__(self): #Get configuration config = config_lasso() hostname = config.get('lasso', 'hostname') port = config.getint('lasso', 'port') WranglerServer.__init__(self, hostname, port, 'wrangler.lasso') #Setup Code Objects self.decorate_task_object() #Clean Up Database db = Session() tasks = db.query(Task).filter(Task.status==Task.QUEUED).all() for task in tasks: task.status = task.WAITING db.commit() db.close() #Initialize self.heard = dict() self.next_task_lock = thread.allocate_lock() self.queue = PriorityQueue()
def __init__(self): self.configure() hostname = info.hostname() port = self.config.getint('cattle', 'port') WranglerServer.__init__(self, hostname, port, 'wrangler.cattle')