summary refs log tree commit diff
path: root/synapse/rest/media/v1
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2017-11-22 18:02:15 +0000
committerRichard van der Hoff <richard@matrix.org>2017-11-22 18:02:15 +0000
commit2908f955d12e8c9d6081a8d72096c85683fe1ebf (patch)
tree1bcab40e5b0fb94bc961f3f826d29358400ee546 /synapse/rest/media/v1
parentFix error on sqlite 3.7 (diff)
downloadsynapse-2908f955d12e8c9d6081a8d72096c85683fe1ebf.tar.xz
Check database in has_completed_background_updates
so that the right thing happens on workers.
Diffstat (limited to 'synapse/rest/media/v1')
-rw-r--r--synapse/rest/media/v1/preview_url_resource.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/rest/media/v1/preview_url_resource.py b/synapse/rest/media/v1/preview_url_resource.py
index dd76e3f7d5..385e4079ec 100644
--- a/synapse/rest/media/v1/preview_url_resource.py
+++ b/synapse/rest/media/v1/preview_url_resource.py
@@ -354,7 +354,7 @@ class PreviewUrlResource(Resource):
 
         logger.info("Running url preview cache expiry")
 
-        if not self.store.has_completed_background_updates():
+        if not (yield self.store.has_completed_background_updates()):
             logger.info("Still running DB updates; skipping expiry")
             return