예제 #1
0
파일: cli.py 프로젝트: imfht/flaskapps
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))
예제 #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')
예제 #3
0
파일: cli.py 프로젝트: fweng322/indico
 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))
예제 #4
0
파일: cli.py 프로젝트: DirkHoffmann/indico
 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)