def stop_supervisord():
    """
    Restarts supervisord
    """
    with virtualenv():
        config_file = os.path.join(env.confs, 'supervisord.conf')
        env.run('supervisorctl -c %s shutdown' % config_file)
def start_supervisord():
    """
    Starts supervisord
    """
    with virtualenv():
        config_file = os.path.join(env.confs, 'supervisord.conf')
        env.run('supervisord -c %s' % config_file)
def supervisorctl(action, process):
    """
    Performs the action on the process, e.g. supervisorctl start uwsgi.
    """
    with virtualenv():
        config_file = os.path.join(env.confs, 'supervisord.conf')
        env.run('supervisorctl -c %s %s %s' % (config_file, action, process))
Example #4
0
def collectstatic():
    """
    Runs collectstatic
    """
    with virtualenv():
        django_settings = 'DJANGO_SETTINGS_MODULE=%s' % env.settings
        env.run('%s ./manage.py collectstatic --noinput' % django_settings)
Example #5
0
def syncdb():
    """
    Runs syncdb (along with any pending south migrations)
    """
    with virtualenv():
        django_settings = 'DJANGO_SETTINGS_MODULE=%s' % env.settings
        env.run('%s ./manage.py syncdb --noinput' % django_settings)
def update_reqs():
    """
    Makes sure all packages listed in requirements are installed
    """
    with virtualenv():
        env.run('pip install -r %s' % env.requirements)