We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ca08b5c commit f41f20dCopy full SHA for f41f20d
api/api/utils/image_proxy/__init__.py
@@ -3,6 +3,7 @@
3
from urllib.parse import urlparse
4
5
from django.conf import settings
6
+from django.db import close_old_connections
7
from django.http import HttpResponse
8
from rest_framework.exceptions import UnsupportedMediaType
9
@@ -297,3 +298,5 @@ async def get(
297
298
)
299
300
raise UpstreamThumbnailException(f"Failed to render thumbnail. {exc}")
301
+ finally:
302
+ close_old_connections()
0 commit comments