django-health-check 3.23.3__tar.gz → 3.23.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {django_health_check-3.23.3 → django_health_check-3.23.5}/PKG-INFO +1 -1
- {django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/_version.py +3 -3
- {django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/cache/backends.py +20 -6
- {django_health_check-3.23.3 → django_health_check-3.23.5}/LICENSE +0 -0
- {django_health_check-3.23.3 → django_health_check-3.23.5}/README.md +0 -0
- {django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/__init__.py +0 -0
- {django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/backends.py +0 -0
- {django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/cache/__init__.py +0 -0
- {django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/cache/apps.py +0 -0
- {django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/conf.py +0 -0
- {django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/contrib/__init__.py +0 -0
- {django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/contrib/celery/__init__.py +0 -0
- {django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/contrib/celery/apps.py +0 -0
- {django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/contrib/celery/backends.py +0 -0
- {django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/contrib/celery/tasks.py +0 -0
- {django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/contrib/celery_ping/__init__.py +0 -0
- {django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/contrib/celery_ping/apps.py +0 -0
- {django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/contrib/celery_ping/backends.py +0 -0
- {django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/contrib/db_heartbeat/__init__.py +0 -0
- {django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/contrib/db_heartbeat/apps.py +0 -0
- {django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/contrib/db_heartbeat/backends.py +0 -0
- {django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/contrib/mail/__init__.py +0 -0
- {django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/contrib/mail/apps.py +0 -0
- {django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/contrib/mail/backends.py +0 -0
- {django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/contrib/migrations/__init__.py +0 -0
- {django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/contrib/migrations/apps.py +0 -0
- {django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/contrib/migrations/backends.py +0 -0
- {django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/contrib/psutil/__init__.py +0 -0
- {django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/contrib/psutil/apps.py +0 -0
- {django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/contrib/psutil/backends.py +0 -0
- {django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/contrib/rabbitmq/__init__.py +0 -0
- {django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/contrib/rabbitmq/apps.py +0 -0
- {django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/contrib/rabbitmq/backends.py +0 -0
- {django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/contrib/redis/__init__.py +0 -0
- {django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/contrib/redis/apps.py +0 -0
- {django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/contrib/redis/backends.py +0 -0
- {django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/contrib/s3boto3_storage/__init__.py +0 -0
- {django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/contrib/s3boto3_storage/apps.py +0 -0
- {django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/contrib/s3boto3_storage/backends.py +0 -0
- {django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/contrib/s3boto_storage/__init__.py +0 -0
- {django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/contrib/s3boto_storage/apps.py +0 -0
- {django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/contrib/s3boto_storage/backends.py +0 -0
- {django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/db/__init__.py +0 -0
- {django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/db/apps.py +0 -0
- {django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/db/backends.py +0 -0
- {django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/db/migrations/0001_initial.py +0 -0
- {django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/db/migrations/0002_alter_testmodel_options.py +0 -0
- {django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/db/migrations/__init__.py +0 -0
- {django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/db/models.py +0 -0
- {django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/deprecation.py +0 -0
- {django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/exceptions.py +0 -0
- {django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/management/__init__.py +0 -0
- {django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/management/commands/__init__.py +0 -0
- {django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/management/commands/health_check.py +0 -0
- {django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/mixins.py +0 -0
- {django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/plugins.py +0 -0
- {django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/storage/__init__.py +0 -0
- {django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/storage/apps.py +0 -0
- {django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/storage/backends.py +0 -0
- {django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/templates/health_check/index.html +0 -0
- {django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/urls.py +0 -0
- {django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/views.py +0 -0
- {django_health_check-3.23.3 → django_health_check-3.23.5}/pyproject.toml +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: django-health-check
|
|
3
|
-
Version: 3.23.
|
|
3
|
+
Version: 3.23.5
|
|
4
4
|
Summary: Monitor the health of your Django app and its connected services.
|
|
5
5
|
Keywords: django,postgresql
|
|
6
6
|
Author-email: Kristian Ollegaard <kristian@oellegaard.com>, Johannes Maron <johannes@maron.family>
|
|
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
|
28
28
|
commit_id: COMMIT_ID
|
|
29
29
|
__commit_id__: COMMIT_ID
|
|
30
30
|
|
|
31
|
-
__version__ = version = '3.23.
|
|
32
|
-
__version_tuple__ = version_tuple = (3, 23,
|
|
31
|
+
__version__ = version = '3.23.5'
|
|
32
|
+
__version_tuple__ = version_tuple = (3, 23, 5)
|
|
33
33
|
|
|
34
|
-
__commit_id__ = commit_id = '
|
|
34
|
+
__commit_id__ = commit_id = 'gb5176b7bf'
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import dataclasses
|
|
2
|
-
import
|
|
2
|
+
import uuid
|
|
3
|
+
import warnings
|
|
3
4
|
|
|
4
5
|
from django.conf import settings
|
|
5
6
|
from django.core.cache import CacheKeyWarning, caches
|
|
@@ -31,17 +32,30 @@ class CacheBackend(HealthCheck):
|
|
|
31
32
|
"""
|
|
32
33
|
|
|
33
34
|
alias: str = dataclasses.field(default="default")
|
|
34
|
-
|
|
35
|
+
key_prefix: str = dataclasses.field(default="djangohealthcheck_test", repr=False)
|
|
36
|
+
cache_key: str | None = dataclasses.field(
|
|
35
37
|
default=getattr(settings, "HEALTHCHECK_CACHE_KEY", "djangohealthcheck_test"), repr=False
|
|
36
38
|
)
|
|
37
39
|
|
|
40
|
+
def __post_init__(self):
|
|
41
|
+
if self.cache_key:
|
|
42
|
+
warnings.warn(
|
|
43
|
+
"`CacheBackend.cache_key` is deprecated and will be removed in next major release. "
|
|
44
|
+
"Use `CacheBackend.key_prefix` instead.",
|
|
45
|
+
DeprecationWarning,
|
|
46
|
+
stacklevel=2,
|
|
47
|
+
)
|
|
48
|
+
|
|
38
49
|
def check_status(self):
|
|
50
|
+
self.cache_key = f"{self.key_prefix}:{uuid.uuid4().hex}"
|
|
39
51
|
cache = caches[self.alias]
|
|
40
|
-
ts = datetime.datetime.now().timestamp()
|
|
41
52
|
try:
|
|
42
|
-
cache.set(
|
|
43
|
-
|
|
44
|
-
|
|
53
|
+
cache.set(
|
|
54
|
+
self.cache_key,
|
|
55
|
+
"itworks",
|
|
56
|
+
)
|
|
57
|
+
if not cache.get(self.cache_key) == "itworks":
|
|
58
|
+
raise ServiceUnavailable(f"Cache key {self.cache_key!r} does not match")
|
|
45
59
|
except CacheKeyWarning as e:
|
|
46
60
|
self.add_error(ServiceReturnedUnexpectedResult("Cache key warning"), e)
|
|
47
61
|
except ValueError as e:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/contrib/celery/__init__.py
RENAMED
|
File without changes
|
{django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/contrib/celery/apps.py
RENAMED
|
File without changes
|
{django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/contrib/celery/backends.py
RENAMED
|
File without changes
|
{django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/contrib/celery/tasks.py
RENAMED
|
File without changes
|
|
File without changes
|
{django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/contrib/celery_ping/apps.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/contrib/db_heartbeat/apps.py
RENAMED
|
File without changes
|
|
File without changes
|
{django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/contrib/mail/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/contrib/mail/backends.py
RENAMED
|
File without changes
|
|
File without changes
|
{django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/contrib/migrations/apps.py
RENAMED
|
File without changes
|
|
File without changes
|
{django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/contrib/psutil/__init__.py
RENAMED
|
File without changes
|
{django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/contrib/psutil/apps.py
RENAMED
|
File without changes
|
{django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/contrib/psutil/backends.py
RENAMED
|
File without changes
|
{django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/contrib/rabbitmq/__init__.py
RENAMED
|
File without changes
|
{django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/contrib/rabbitmq/apps.py
RENAMED
|
File without changes
|
{django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/contrib/rabbitmq/backends.py
RENAMED
|
File without changes
|
{django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/contrib/redis/__init__.py
RENAMED
|
File without changes
|
{django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/contrib/redis/apps.py
RENAMED
|
File without changes
|
{django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/contrib/redis/backends.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/db/migrations/0001_initial.py
RENAMED
|
File without changes
|
|
File without changes
|
{django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/db/migrations/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{django_health_check-3.23.3 → django_health_check-3.23.5}/health_check/management/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|