Merge pull request #6 from EbookFoundation/celery-service
notices were not emitting because the celery user couldn't create lock filesmaster
commit
416ad20b03
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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'
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue