diff options
author | Erik Johnston <erik@matrix.org> | 2016-06-02 11:52:32 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2016-06-03 11:19:22 +0100 |
commit | e043ede4a2f18a47b67bf19368600183554824f7 (patch) | |
tree | 37f0f00d796f7f40fea67c81e6747eaca96b00fc /synapse/util/caches/descriptors.py | |
parent | Make cachedList go a bit faster (diff) | |
download | synapse-e043ede4a2f18a47b67bf19368600183554824f7.tar.xz |
Small optimisation to CacheListDescriptor
Diffstat (limited to 'synapse/util/caches/descriptors.py')
-rw-r--r-- | synapse/util/caches/descriptors.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/util/caches/descriptors.py b/synapse/util/caches/descriptors.py index 4bbb16ed3c..5be4097279 100644 --- a/synapse/util/caches/descriptors.py +++ b/synapse/util/caches/descriptors.py @@ -311,12 +311,12 @@ class CacheListDescriptor(object): try: res = cache.get(tuple(key)) - if not res.called: + if not res.has_succeeded(): res = res.observe() res.addCallback(lambda r, arg: (arg, r), arg) cached_defers[arg] = res else: - results[arg] = res.result + results[arg] = res.get_result() except KeyError: missing.append(arg) |