summary refs log tree commit diff
path: root/synapse/metrics/__init__.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2021-11-08 14:33:58 +0000
committerErik Johnston <erik@matrix.org>2021-11-08 14:33:58 +0000
commit61e28c41cdf8b2e2b75ae950ee63b6ea223ba16c (patch)
tree68a34080ae5e79aa506ed8194d6b3af05dc5ffc7 /synapse/metrics/__init__.py
parentinstall timers (diff)
downloadsynapse-61e28c41cdf8b2e2b75ae950ee63b6ea223ba16c.tar.xz
Fixup
Diffstat (limited to 'synapse/metrics/__init__.py')
-rw-r--r--synapse/metrics/__init__.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/synapse/metrics/__init__.py b/synapse/metrics/__init__.py
index d7475ddf12..98db75192e 100644
--- a/synapse/metrics/__init__.py
+++ b/synapse/metrics/__init__.py
@@ -586,9 +586,7 @@ _last_gc = [0.0, 0.0, 0.0]
 
 def callFromThreadTimer(func):
     @functools.wraps(func)
-    def callFromThread(
-        self, f: Callable[..., Any], *args: object, **kwargs: object
-    ) -> None:
+    def callFromThread(f: Callable[..., Any], *args: object, **kwargs: object) -> None:
         @functools.wraps(f)
         def g(*args, **kwargs):
             start = time.time()
@@ -604,7 +602,7 @@ def callFromThreadTimer(func):
 
             return r
 
-        func(f, args, kwargs)
+        func(g, args, kwargs)
 
     return callFromThread