0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-15 02:43:54 +01:00

Add a comment explaining why automatic metric reporting is disabled for JsonResource

This commit is contained in:
Mark Haines 2016-04-28 12:31:26 +01:00
parent 6037349512
commit 1a12766e3b

View file

@ -214,6 +214,10 @@ class JsonResource(HttpServer, resource.Resource):
self._async_render(request) self._async_render(request)
return server.NOT_DONE_YET return server.NOT_DONE_YET
# Disable metric reporting because _async_render does its own metrics.
# It does its own metric reporting because _async_render dispatches to
# a callback and it's the class name of that callback we want to report
# against rather than the JsonResource itself.
@request_handler(report_metrics=False) @request_handler(report_metrics=False)
@defer.inlineCallbacks @defer.inlineCallbacks
def _async_render(self, request): def _async_render(self, request):