diff options
| author | Jon Janzen <jon@jonjanzen.com> | 2020-11-07 13:19:20 +0300 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2023-03-07 08:39:25 +0100 |
| commit | e83a88566a71a2353cebc35992c110be0f8628af (patch) | |
| tree | 466c863fc3bfe6fc9946b5a3f7163c62e58ecbb9 /django/core | |
| parent | 9a07999aef7958c9b5441e368cd90646d0edc5c9 (diff) | |
Fixed #32172 -- Adapted signals to allow async handlers.
co-authored-by: kozzztik <kozzztik@mail.ru>
co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es>
Diffstat (limited to 'django/core')
| -rw-r--r-- | django/core/handlers/asgi.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/django/core/handlers/asgi.py b/django/core/handlers/asgi.py index 39e2abe5a9..569157b277 100644 --- a/django/core/handlers/asgi.py +++ b/django/core/handlers/asgi.py @@ -170,9 +170,7 @@ class ASGIHandler(base.BaseHandler): return # Request is complete and can be served. set_script_prefix(self.get_script_prefix(scope)) - await sync_to_async(signals.request_started.send, thread_sensitive=True)( - sender=self.__class__, scope=scope - ) + await signals.request_started.asend(sender=self.__class__, scope=scope) # Get the request and check for basic issues. request, error_response = self.create_request(scope, body_file) if request is None: |
