mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 00:34:47 -04:00
Convert run_as_background_process inner function to async. (#8032)
This commit is contained in:
parent
66f24449dd
commit
c36228c403
4 changed files with 16 additions and 26 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue