Open KaczuH opened 4 months ago
EasyAuditMiddleware currently only supports synchronous code, requiring adaptations by Django for async operation.
EasyAuditMiddleware
As such, projects using easy audit cannot benefit from async stack as shown by the django.request logger:
django.request
DEBUG:django.request:Asynchronous handler adapted for middleware easyaudit.middleware.easyaudit.EasyAuditMiddleware.
Relevant Django documentation can be found in Django Docs:.
There is a potential simple fix: replacing threading.local with asgiref and using MiddlewareMixin.
threading.local
asgiref
MiddlewareMixin
EasyAuditMiddleware
currently only supports synchronous code, requiring adaptations by Django for async operation.As such, projects using easy audit cannot benefit from async stack as shown by the
django.request
logger:DEBUG:django.request:Asynchronous handler adapted for middleware easyaudit.middleware.easyaudit.EasyAuditMiddleware.
Relevant Django documentation can be found in Django Docs:.
There is a potential simple fix: replacing
threading.local
withasgiref
and usingMiddlewareMixin
.