@task
def restart():
    sudo("/etc/init.d/celeryd restart; sleep 5")
    sudo("/etc/init.d/celerybeat restart; sleep 5")
Restart Celery and Celerybeat
dataset/ETHPy150Open onefinestay/gonzo/gonzo/tasks/celery.py/restart