django-health-check
django-health-check copied to clipboard
Improve configuration of default storage
Previously it was set using str
with dotted path to storage, so StorageHealthCheck.get_storage
initialize it on every call. This may lead to redundant calls to external APIs (see https://github.com/boto/boto3/issues/3614)
Meanwhile django.core.files.storage.default_storage
is lazy object that can be safely used as class attribute, and single storage
object may be reused
Also fixes #366
@frankwiles Hello, can you please check this PR? Just curious about will I be able to use this feature soon
Hi @frankwiles, could you please take a loot at this one or at #408 or #383 ?
Without this fix, django-health-check
cannot be used with newer versions of Django (see https://docs.djangoproject.com/en/dev/releases/5.1/#features-removed-in-5-1)