summary refs log tree commit diff
path: root/synapse/util
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-05-14 15:34:02 +0100
committerErik Johnston <erik@matrix.org>2015-05-14 15:34:02 +0100
commit7cd6a6f6cf03e5bfde99b839bdc67f8f5513cdc5 (patch)
treee3faa0100137549d729850cd08fdec3059b7a26e /synapse/util
parentTurn off preemptive transactions (diff)
downloadsynapse-7cd6a6f6cf03e5bfde99b839bdc67f8f5513cdc5.tar.xz
Awful idea for speeding up fetching of events
Diffstat (limited to 'synapse/util')
-rw-r--r--synapse/util/__init__.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/synapse/util/__init__.py b/synapse/util/__init__.py

index b9afb3364d..260714ccc2 100644 --- a/synapse/util/__init__.py +++ b/synapse/util/__init__.py
@@ -80,16 +80,16 @@ class Clock(object): def stop_looping_call(self, loop): loop.stop() - def call_later(self, delay, callback): + def call_later(self, delay, callback, *args, **kwargs): current_context = LoggingContext.current_context() - def wrapped_callback(): + def wrapped_callback(*args, **kwargs): with PreserveLoggingContext(): LoggingContext.thread_local.current_context = current_context - callback() + callback(*args, **kwargs) with PreserveLoggingContext(): - return reactor.callLater(delay, wrapped_callback) + return reactor.callLater(delay, wrapped_callback, *args, **kwargs) def cancel_call_later(self, timer): timer.cancel()