Log activity on all periodic Celery tasks

As stated in the comment, this would have been helpful during an
incident to give further reassurance that a task had at least
started running - at the time the only evidence for this was the
Cronitor dashboard itself, which we don't often look at.

I've removed other, equivalent "starting" logs, but kept those
that provide additional information in the log message.
This commit is contained in:
Ben Thorner
2021-11-16 17:33:36 +00:00
parent 782aef351c
commit 666ac1ab4f
4 changed files with 8 additions and 4 deletions

View File

@@ -1,3 +1,4 @@
import logging
from urllib import parse
import pytest
@@ -75,6 +76,9 @@ def test_cronitor_does_nothing_if_cronitor_not_enabled(notify_api, rmock):
def test_cronitor_does_nothing_if_name_not_recognised(notify_api, rmock, caplog):
# ignore "INFO" log about task starting
caplog.set_level(logging.ERROR)
with set_config_values(notify_api, {
'CRONITOR_ENABLED': True,
'CRONITOR_KEYS': {'not-hello': 'other'}