

def process(self, backend):
    self.log.debug('Checking backend for items')
    self.set_process_title('Waiting for items')
    self.tell_master(None, False)
    job = backend.dequeue(self.queue, 15)
    if (job is None):
        return False
    self.tell_master(job.timeout, job.sigkill_on_stop)
    self.log.debug('Running job %s', job)
    self.set_process_title(('Running job %s' % job))
    if (job.run() and self.touch_filename):
        with open(self.touch_filename, 'a'):
            os.utime(self.touch_filename, None)
    for x in connections:
        try:
            transaction.abort(x)
        except AttributeError:
            pass
        connections[x].close()
    return True

dataset/ETHPy150Open thread/django-lightweight-queue/django_lightweight_queue/worker.py Worker.process/original