diff --git a/roles/regluit_prod/tasks/celery.yml b/roles/regluit_prod/tasks/celery.yml index 95478bf..8e11b6f 100644 --- a/roles/regluit_prod/tasks/celery.yml +++ b/roles/regluit_prod/tasks/celery.yml @@ -50,10 +50,12 @@ ansible.builtin.service: name: celeryd daemon_reload: yes + enabled: yes state: reloaded - name: Start celerybeat become: yes ansible.builtin.service: name: celerybeat + enabled: yes state: restarted diff --git a/roles/regluit_prod/tasks/main.yml b/roles/regluit_prod/tasks/main.yml index 2e6160c..10bb563 100644 --- a/roles/regluit_prod/tasks/main.yml +++ b/roles/regluit_prod/tasks/main.yml @@ -36,6 +36,15 @@ - 'regluit.pth' - 'opt.pth' +- name: Create lock directory + file: + path: "{{ project_path}}/.lock" + state: directory + owner: "{{ user_name }}" + group: "www-data" + mode: 0775 + + - name: Create keys directory file: path: "{{ project_path}}/settings/keys" diff --git a/roles/regluit_prod/templates/prod.py.j2 b/roles/regluit_prod/templates/prod.py.j2 index e98d4bd..1646f6f 100644 --- a/roles/regluit_prod/templates/prod.py.j2 +++ b/roles/regluit_prod/templates/prod.py.j2 @@ -105,6 +105,7 @@ CELERY_LOG_DIR = '/var/log/celery' # decide which of the period tasks to add to the schedule if '{{ deploy_type }}' == 'test': CELERYBEAT_SCHEDULE['send_test_email'] = SEND_TEST_EMAIL_JOB + CELERYBEAT_SCHEDULE['save_info_page'] = SAVE_INFO_PAGE_TEST elif '{{ deploy_type }}' == 'prod': # update the statuses of campaigns CELERYBEAT_SCHEDULE['update_active_campaign_statuses'] = UPDATE_ACTIVE_CAMPAIGN_STATUSES @@ -140,3 +141,5 @@ try: from regluit.settings.local import * except ImportError: pass + +NOTIFICATION_LOCK_FILE = '/opt/regluit/.lock/send_notices' \ No newline at end of file diff --git a/setup-dev.yml b/setup-dev.yml index 7fd6f54..8401144 100644 --- a/setup-dev.yml +++ b/setup-dev.yml @@ -1,5 +1,5 @@ - hosts: regluit-dev - gather_facts: true + gather_facts: false tasks: # Need to install python3.6 and pip first so Ansible will function - name: Install python3.6 and pip for dev