def _set_queue(self, name): self._queue = QueueService.get_queue(name)
def __init__(self, queue_type, queue_name, num_greenlets=1): self.queue_name = queue_name self.queue = QueueService.register(queue_name, queue_type) self._num_greenlets = num_greenlets self._worker_id = uuid.uuid4().hex
def ifailed(cls, queue_name): q = QueueService.get_queue(queue_name) for key in q.ifailed(): yield cls.fetch(key)