diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2021-03-03 15:47:38 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-03 15:47:38 -0500 |
commit | 33a02f0f52a5cd793c0d123463d8a7a1e3f4f198 (patch) | |
tree | 0d53722ffb90376b2998bdf2f206e3b9d76da9d3 /synapse/metrics | |
parent | Set X-Forwarded-Proto header when frontend-proxy proxies a request (#9539) (diff) | |
download | synapse-33a02f0f52a5cd793c0d123463d8a7a1e3f4f198.tar.xz |
Fix additional type hints from Twisted upgrade. (#9518)
Diffstat (limited to 'synapse/metrics')
-rw-r--r-- | synapse/metrics/__init__.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/synapse/metrics/__init__.py b/synapse/metrics/__init__.py index a8cb49d5b4..3b499efc07 100644 --- a/synapse/metrics/__init__.py +++ b/synapse/metrics/__init__.py @@ -527,7 +527,7 @@ class ReactorLastSeenMetric: REGISTRY.register(ReactorLastSeenMetric()) -def runUntilCurrentTimer(func): +def runUntilCurrentTimer(reactor, func): @functools.wraps(func) def f(*args, **kwargs): now = reactor.seconds() @@ -590,13 +590,14 @@ def runUntilCurrentTimer(func): try: # Ensure the reactor has all the attributes we expect - reactor.runUntilCurrent - reactor._newTimedCalls - reactor.threadCallQueue + reactor.seconds # type: ignore + reactor.runUntilCurrent # type: ignore + reactor._newTimedCalls # type: ignore + reactor.threadCallQueue # type: ignore # runUntilCurrent is called when we have pending calls. It is called once # per iteratation after fd polling. - reactor.runUntilCurrent = runUntilCurrentTimer(reactor.runUntilCurrent) + reactor.runUntilCurrent = runUntilCurrentTimer(reactor, reactor.runUntilCurrent) # type: ignore # We manually run the GC each reactor tick so that we can get some metrics # about time spent doing GC, |