src/sisy/consumers.py
def run_task(message):
    """Internal ``RUN_TASK`` consumer to run the task's callable"""
    task = Task.objects.get(pk=message['id'])
    if task.allow_overlap:
        task.run(message)
    else:
        if not task.running:
            task.running = True
            task.save()
            try:
                task.run(message)
            finally:
                task.running = False
                task.save()
def run_task(message):
    task = Task.objects.get(pk=message['id'])
    if task.allow_overlap:
        task.run(message)
    else:
        if not task.running:
            task.running = True
            task.save()
            try:
                task.run(message)
            finally:
                task.running = False
                task.save()
def run_task ( message ) : task = Task . objects . get ( pk = message [ 'id' ] ) if task . allow_overlap : task . run ( message ) else : if not task . running : task . running = True task . save ( ) try : task . run ( message ) finally : task . running = False task . save ( )
Internal ``RUN_TASK`` consumer to run the task's callable
Internal RUN_TASK consumer to run the task s callable