Skip to content

Commit

Permalink
bug-1827506: Log backend errors in the Dockerflow health check.
Browse files Browse the repository at this point in the history
  • Loading branch information
smarnach committed Jul 29, 2024
1 parent 57b8401 commit 69aac3c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tecken/libdockerflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# file, You can obtain one at https://mozilla.org/MPL/2.0/.

import json
import logging
from pathlib import Path

from django.core import checks
Expand All @@ -11,6 +12,9 @@
from tecken.libstorage import StorageError


logger = logging.getLogger("tecken")


def check_storage_urls(app_configs, **kwargs):
errors = []
for backend in symbol_storage().get_download_backends(False):
Expand All @@ -23,6 +27,7 @@ def check_storage_urls(app_configs, **kwargs):
)
)
except StorageError as error:
logger.exception("Error when testing whether storage backend exists")
errors.append(
checks.Error(
f"Connection error: {error}",
Expand Down

0 comments on commit 69aac3c

Please sign in to comment.