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))
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')
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))
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)