Exemplo n.º 1
0
def unlock(name):
    """Unlock a locked task.

    Use this if your celery worker was e.g. killed by your kernel's
    oom-killer and thus a task never got unlocked.

    Examples:

        indico celery unlock event_reminders
    """

    if unlock_task(name):
        print(cformat('%{green!}Task {} unlocked').format(name))
    else:
        print(cformat('%{yellow}Task {} is not locked').format(name))
Exemplo n.º 2
0
def unlock(name):
    """Unlock a locked task.

    Use this if your celery worker was e.g. killed by your kernel's
    oom-killer and thus a task never got unlocked.

    Examples:

        indico celery unlock event_reminders
    """

    if unlock_task(name):
        click.secho(f'Task {name} unlocked', fg='green', bold=True)
    else:
        click.secho(f'Task {name} is not locked', fg='yellow')
Exemplo n.º 3
0
 def run(self, name, **kwargs):
     if unlock_task(name):
         print(cformat('%{green!}Task {} unlocked').format(name))
     else:
         print(cformat('%{yellow}Task {} is not locked').format(name))
Exemplo n.º 4
0
 def run(self, name, **kwargs):
     if unlock_task(name):
         print cformat('%{green!}Task {} unlocked').format(name)
     else:
         print cformat('%{yellow}Task {} is not locked').format(name)