From a7467375203f4184044c2b9f30127e8e42663657 Mon Sep 17 00:00:00 2001 From: Jeremy Cline Date: Tue, 31 Oct 2017 20:21:19 +0000 Subject: [PATCH] Start celerybeat on the staging notif backend Signed-off-by: Jeremy Cline --- roles/notifs/backend/tasks/main.yml | 9 +++++++++ roles/notifs/backend/templates/fmn.consumer.py | 16 ++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/roles/notifs/backend/tasks/main.yml b/roles/notifs/backend/tasks/main.yml index 218b0c067c..11416ad111 100644 --- a/roles/notifs/backend/tasks/main.yml +++ b/roles/notifs/backend/tasks/main.yml @@ -71,3 +71,12 @@ tags: - notifs - notifs/backend + +- name: start the FMN celerybeat service + service: name={{item}} enabled=yes state=started + with_items: + - fmn-celerybeat + tags: + - notifs + - notifs/backend + when: env == "staging" diff --git a/roles/notifs/backend/templates/fmn.consumer.py b/roles/notifs/backend/templates/fmn.consumer.py index 5cf5b04e48..64862e521d 100644 --- a/roles/notifs/backend/templates/fmn.consumer.py +++ b/roles/notifs/backend/templates/fmn.consumer.py @@ -182,6 +182,21 @@ config = { "fmn.support_email": "notifications@" + domain, # Generic stuff + {% if env == 'staging' %} + "logging": dict( + loggers=dict( + fmn={ + "level": "INFO", + "propagate": False, + "handlers": ["console", "mailer"], + }, + ), + root={ + 'level': 'INFO', + 'handlers': ['console', 'mailer'], + }, + ), + {% else %} "logging": dict( loggers=dict( fmn={ @@ -191,4 +206,5 @@ config = { }, ), ), + {% endif %} }