From b4cd46f33295449dbde35e87d759bc01b2473afa Mon Sep 17 00:00:00 2001 From: Jan Szejko Date: Mon, 1 Feb 2016 10:33:24 +0100 Subject: [PATCH] new tasks in fab production --- fabfile.py | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) 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'] -- 2.20.1