mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 04:23:46 +00:00
tornado: Use Signal.asend.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
1e99745023
commit
e769e546b6
@@ -28,3 +28,4 @@ couldn
|
|||||||
ges
|
ges
|
||||||
assertIn
|
assertIn
|
||||||
thirdparty
|
thirdparty
|
||||||
|
asend
|
||||||
|
|||||||
@@ -132,10 +132,7 @@ class AsyncDjangoHandler(tornado.web.RequestHandler):
|
|||||||
# Django's WSGIHandler.__call__ before the call to
|
# Django's WSGIHandler.__call__ before the call to
|
||||||
# `get_response()`.
|
# `get_response()`.
|
||||||
set_script_prefix(get_script_name(environ))
|
set_script_prefix(get_script_name(environ))
|
||||||
await sync_to_async(
|
await signals.request_started.asend(sender=type(self.django_handler))
|
||||||
lambda: signals.request_started.send(sender=type(self.django_handler)),
|
|
||||||
thread_sensitive=True,
|
|
||||||
)()
|
|
||||||
self._request = WSGIRequest(environ)
|
self._request = WSGIRequest(environ)
|
||||||
|
|
||||||
# We do the import during runtime to avoid cyclic dependency
|
# We do the import during runtime to avoid cyclic dependency
|
||||||
|
|||||||
Reference in New Issue
Block a user