diff options
author | Richard van der Hoff <richard@matrix.org> | 2017-11-22 18:02:15 +0000 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2017-11-22 18:02:15 +0000 |
commit | 2908f955d12e8c9d6081a8d72096c85683fe1ebf (patch) | |
tree | 1bcab40e5b0fb94bc961f3f826d29358400ee546 /synapse/rest | |
parent | Fix error on sqlite 3.7 (diff) | |
download | synapse-2908f955d12e8c9d6081a8d72096c85683fe1ebf.tar.xz |
Check database in has_completed_background_updates
so that the right thing happens on workers.
Diffstat (limited to 'synapse/rest')
-rw-r--r-- | synapse/rest/media/v1/preview_url_resource.py | 2 |
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 |