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))
def collectstatic(): """ Runs collectstatic """ with virtualenv(): django_settings = 'DJANGO_SETTINGS_MODULE=%s' % env.settings env.run('%s ./manage.py collectstatic --noinput' % django_settings)
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)