diff --git a/edx_arch_experiments/config_watcher/apps.py b/edx_arch_experiments/config_watcher/apps.py index 36ea4ec..afb6d97 100644 --- a/edx_arch_experiments/config_watcher/apps.py +++ b/edx_arch_experiments/config_watcher/apps.py @@ -4,6 +4,7 @@ from django.apps import AppConfig + class ConfigWatcherApp(AppConfig): """ Django application to report configuration changes to operators. diff --git a/edx_arch_experiments/config_watcher/signals/receivers.py b/edx_arch_experiments/config_watcher/signals/receivers.py index 70f8570..fb18963 100644 --- a/edx_arch_experiments/config_watcher/signals/receivers.py +++ b/edx_arch_experiments/config_watcher/signals/receivers.py @@ -42,6 +42,7 @@ def _send_to_slack(message): if status != 200: log.error(f"Slack rejected the config watcher message. {status=}, body={resp.read().decode('utf-8')}") + def _report_config_change(message): log.info(message) _send_to_slack(message) @@ -89,7 +90,7 @@ def _register_waffle_observation(*, model, short_name, fields): def report_waffle_change(*args, instance, created, **kwargs): try: _report_waffle_change(short_name, instance, created, fields) - except: + except: # pylint: disable=bare-except # Log and suppress error so Waffle change can proceed log.exception(f"Failed to report change to waffle {short_name}") @@ -97,7 +98,7 @@ def report_waffle_change(*args, instance, created, **kwargs): def report_waffle_delete(*args, instance, **kwargs): try: _report_waffle_delete(short_name, instance) - except: + except: # pylint: disable=bare-except log.exception(f"Failed to report deletion of waffle {short_name}")