Skip to content

Commit

Permalink
Add cache checks
Browse files Browse the repository at this point in the history
  • Loading branch information
pikhovkin committed Aug 19, 2021
1 parent 37b9575 commit 8680d23
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion simple_health_check/checks/caches.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from typing import Optional

from django.core.cache import CacheKeyWarning, caches
from django.conf import settings

from . import BaseHealthCheck
from ..exceptions import HealthCheckError
Expand All @@ -15,7 +16,7 @@ def check(self):
if self.alias:
caches[self.alias]
try:
for alias in caches:
for alias in getattr(settings, 'CACHES', {}).keys():
if self.alias and alias != self.alias:
continue

Expand Down

0 comments on commit 8680d23

Please sign in to comment.