Source

django-fab-deploy-ext / fab_deploy_ext / celery.py

Full commit
from fabric.api import run
from fabric.api import sudo

from fab_deploy import utils


__all__ = ['celery_create_log_dir', 'celeryctl']


@utils.run_as_sudo
def celery_create_log_dir():
    sudo('mkdir --parents /var/log/supervisord')
    sudo('mkdir --parents /var/log/celery')

@utils.inside_project
def celeryctl(command=''):
    run('./manage.py celeryctl %s' % command)