Пример #1
0
def stop_supervisord():
    """
    Restarts supervisord
    """
    with virtualenv():
        config_file = os.path.join(env.confs, 'supervisord.conf')
        env.run('supervisorctl -c %s shutdown' % config_file)
Пример #2
0
def start_supervisord():
    """
    Starts supervisord
    """
    with virtualenv():
        config_file = os.path.join(env.confs, 'supervisord.conf')
        env.run('supervisord -c %s' % config_file)
Пример #3
0
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))
Пример #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)
Пример #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)
Пример #6
0
def update_reqs():
    """
    Makes sure all packages listed in requirements are installed
    """
    with virtualenv():
        env.run('pip install -r %s' % env.requirements)