From: Jan Szejko Date: Mon, 1 Feb 2016 09:33:24 +0000 (+0100) Subject: new tasks in fab production X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/b4cd46f33295449dbde35e87d759bc01b2473afa?ds=sidebyside new tasks in fab production --- diff --git a/fabfile.py b/fabfile.py index a9e621d78..ff9a4b4f8 100644 --- a/fabfile.py +++ b/fabfile.py @@ -10,19 +10,6 @@ except ImportError: env.project_name = 'wolnelektury' -@task -def production(): - env.hosts = ['giewont.icm.edu.pl'] - env.user = 'lektury' - env.app_path = '/srv/wolnelektury.pl' - env.django_root_path = 'src' - env.requirements_file = 'requirements/requirements.txt' - env.services = [ - Supervisord('wolnelektury'), - Supervisord('wolnelektury.celery'), - ] - - def update_counters(): print '>>> updating counters' require('app_path', 'project_name') @@ -37,6 +24,23 @@ def compile_messages(): run('source %(ve)s/bin/activate && python manage.py localepack -c' % env, pty=True) +@task +def production(): + env.hosts = ['giewont.icm.edu.pl'] + env.user = 'lektury' + env.app_path = '/srv/wolnelektury.pl' + env.django_root_path = 'src' + env.requirements_file = 'requirements/requirements.txt' + env.pre_collectstatic = [ + update_counters, + compile_messages, + ] + env.services = [ + Supervisord('wolnelektury'), + Supervisord('wolnelektury.celery'), + ] + + @task def beta(): env.hosts = ['giewont.icm.edu.pl']