summary refs log tree commit diff
path: root/synapse/storage/_base.py
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2017-05-16 15:50:11 +0100
committerGitHub <noreply@github.com>2017-05-16 15:50:11 +0100
commitb8492b6c2ff93ff2345fb3017cbe6f386bb273b7 (patch)
tree380db9f4982ae762dc7d0a4bfc932cdfdf9ccd5c /synapse/storage/_base.py
parentMerge pull request #2218 from matrix-org/rav/event_search_index (diff)
parentRemove spurious merge artifacts (diff)
downloadsynapse-b8492b6c2ff93ff2345fb3017cbe6f386bb273b7.tar.xz
Merge pull request #2224 from matrix-org/erikj/prefill_state
Prefill state caches
Diffstat (limited to 'synapse/storage/_base.py')
-rw-r--r--synapse/storage/_base.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/synapse/storage/_base.py b/synapse/storage/_base.py
index c659004e8d..58b73af7d2 100644
--- a/synapse/storage/_base.py
+++ b/synapse/storage/_base.py
@@ -60,12 +60,12 @@ class LoggingTransaction(object):
         object.__setattr__(self, "database_engine", database_engine)
         object.__setattr__(self, "after_callbacks", after_callbacks)
 
-    def call_after(self, callback, *args):
+    def call_after(self, callback, *args, **kwargs):
         """Call the given callback on the main twisted thread after the
         transaction has finished. Used to invalidate the caches on the
         correct thread.
         """
-        self.after_callbacks.append((callback, args))
+        self.after_callbacks.append((callback, args, kwargs))
 
     def __getattr__(self, name):
         return getattr(self.txn, name)
@@ -319,8 +319,8 @@ class SQLBaseStore(object):
                     inner_func, *args, **kwargs
                 )
         finally:
-            for after_callback, after_args in after_callbacks:
-                after_callback(*after_args)
+            for after_callback, after_args, after_kwargs in after_callbacks:
+                after_callback(*after_args, **after_kwargs)
         defer.returnValue(result)
 
     @defer.inlineCallbacks