diff options
author | Mark Haines <mark.haines@matrix.org> | 2014-11-14 11:16:50 +0000 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2014-11-14 11:16:50 +0000 |
commit | e903c941cb1bed18026f00ed1d3495a8d172f13a (patch) | |
tree | 894da7441d913361b70da4cc13cd73ead86d2e67 /synapse/util | |
parent | Remove unused 'context' variables to appease pyflakes (diff) | |
parent | Add notification-service unit tests. (diff) | |
download | synapse-e903c941cb1bed18026f00ed1d3495a8d172f13a.tar.xz |
Merge branch 'develop' into request_logging
Conflicts: setup.py synapse/storage/_base.py synapse/util/async.py
Diffstat (limited to 'synapse/util')
-rw-r--r-- | synapse/util/async.py | 6 | ||||
-rw-r--r-- | synapse/util/jsonobject.py | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/synapse/util/async.py b/synapse/util/async.py index 3d3fbe182c..1219d927db 100644 --- a/synapse/util/async.py +++ b/synapse/util/async.py @@ -24,3 +24,9 @@ def sleep(seconds): reactor.callLater(seconds, d.callback, seconds) with PreserveLoggingContext(): yield d + +def run_on_reactor(): + """ This will cause the rest of the function to be invoked upon the next + iteration of the main loop + """ + return sleep(0) diff --git a/synapse/util/jsonobject.py b/synapse/util/jsonobject.py index c91eb897a8..e79b68f661 100644 --- a/synapse/util/jsonobject.py +++ b/synapse/util/jsonobject.py @@ -80,7 +80,7 @@ class JsonEncodedObject(object): def get_full_dict(self): d = { - k: v for (k, v) in self.__dict__.items() + k: _encode(v) for (k, v) in self.__dict__.items() if k in self.valid_keys or k in self.internal_keys } d.update(self.unrecognized_keys) |