def loop(self): q = Queue() while is_work == 1: q.ping() query = q.next() if query: if self.parse(query): q.finished() else: q.aborted() else: time.sleep(1)
def set_queue(self): from spectrobot.model.queue import Queue q = Queue() q.parse(self.browser)