diff --git a/conf/settings.py b/conf/settings.py index e838f4e3..aad67315 100644 --- a/conf/settings.py +++ b/conf/settings.py @@ -37,6 +37,8 @@ "django.contrib.staticfiles", "mail", "background_task", + # This is app custome healthcheck app and health_check is django-health-check + "healthcheck", "health_check", "health_check.db", "health_check.cache", diff --git a/healthcheck/apps.py b/healthcheck/apps.py index e5500bed..f22459ab 100644 --- a/healthcheck/apps.py +++ b/healthcheck/apps.py @@ -10,11 +10,9 @@ def ready(self): from .checks import ( MailboxAuthenticationHealthCheck, LicencePayloadsHealthCheck, - ManageInboxTaskHealthCheck, PendingMailHealthCheck, ) plugin_dir.register(MailboxAuthenticationHealthCheck) plugin_dir.register(LicencePayloadsHealthCheck) - plugin_dir.register(ManageInboxTaskHealthCheck) plugin_dir.register(PendingMailHealthCheck) diff --git a/healthcheck/checks.py b/healthcheck/checks.py index 06027d5d..32a8ae31 100644 --- a/healthcheck/checks.py +++ b/healthcheck/checks.py @@ -4,13 +4,14 @@ from django.conf import settings from django.utils import timezone + from health_check.backends import BaseHealthCheckBackend from health_check.exceptions import HealthCheckException - from mail.enums import ReceptionStatusEnum from mail.libraries.routing_controller import get_hmrc_to_dit_mailserver, get_spire_to_dit_mailserver from mail.models import LicencePayload, Mail + logger = logging.getLogger(__name__)