summary refs log tree commit diff
path: root/synapse/rest/media/v1/upload_resource.py
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2016-04-28 10:57:49 +0100
committerMark Haines <mark.haines@matrix.org>2016-04-28 10:57:49 +0100
commit8d7ad44331d7eff4a140b1e4777532d8a3fb26cb (patch)
treefaddd565b52aa68dc1108a1c0c5903e66ae591c3 /synapse/rest/media/v1/upload_resource.py
parentMerge pull request #755 from matrix-org/markjh/right_direction (diff)
downloadsynapse-8d7ad44331d7eff4a140b1e4777532d8a3fb26cb.tar.xz
Report per request metrics for all of the things using request_handler
Diffstat (limited to 'synapse/rest/media/v1/upload_resource.py')
-rw-r--r--synapse/rest/media/v1/upload_resource.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/rest/media/v1/upload_resource.py b/synapse/rest/media/v1/upload_resource.py
index 299e1f6e56..b716d1d892 100644
--- a/synapse/rest/media/v1/upload_resource.py
+++ b/synapse/rest/media/v1/upload_resource.py
@@ -41,6 +41,7 @@ class UploadResource(Resource):
         self.auth = hs.get_auth()
         self.max_upload_size = hs.config.max_upload_size
         self.version_string = hs.version_string
+        self.clock = hs.get_clock()
 
     def render_POST(self, request):
         self._async_render_POST(request)
@@ -50,7 +51,7 @@ class UploadResource(Resource):
         respond_with_json(request, 200, {}, send_cors=True)
         return NOT_DONE_YET
 
-    @request_handler
+    @request_handler()
     @defer.inlineCallbacks
     def _async_render_POST(self, request):
         requester = yield self.auth.get_user_by_req(request)