X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/4b98a57e07c61b12f9febe0d452901c1e2d7bfc1..a0655bd8dbfc709524e24581309618f92225d216:/fabfile.py?ds=inline 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']