This commit is contained in:
Erik Johnston 2024-06-21 16:15:20 +01:00
parent c9a743d053
commit 3368c1cb0a

View file

@ -547,7 +547,9 @@ class JsonResource(DirectServeJsonResource):
# Is it synchronous? We'll allow this for now.
if isinstance(raw_callback_return, (defer.Deferred, types.CoroutineType)):
callback_return = await raw_callback_return
callback_return = await measure_coroutine(
request.request_metrics.name, raw_callback_return
)
else:
callback_return = raw_callback_return