summary refs log tree commit diff
path: root/synapse/http
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2020-08-06 08:20:42 -0400
committerGitHub <noreply@github.com>2020-08-06 08:20:42 -0400
commitc36228c40340f521ad52591ac3eab14946db4be2 (patch)
treef1e8084a2d189017a344ad34a95c5f967044916a /synapse/http
parentImprove performance of the register endpoint (#8009) (diff)
downloadsynapse-c36228c40340f521ad52591ac3eab14946db4be2.tar.xz
Convert run_as_background_process inner function to async. (#8032)
Diffstat (limited to 'synapse/http')
-rw-r--r--synapse/http/site.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/synapse/http/site.py b/synapse/http/site.py
index 6f3b2258cc..f506152fea 100644
--- a/synapse/http/site.py
+++ b/synapse/http/site.py
@@ -146,10 +146,9 @@ class SynapseRequest(Request):
 
         Returns a context manager; the correct way to use this is:
 
-        @defer.inlineCallbacks
-        def handle_request(request):
+        async def handle_request(request):
             with request.processing("FooServlet"):
-                yield really_handle_the_request()
+                await really_handle_the_request()
 
         Once the context manager is closed, the completion of the request will be logged,
         and the various metrics will be updated.