Check database in has_completed_background_updates

so that the right thing happens on workers.
This commit is contained in:
Richard van der Hoff 2017-11-22 18:02:15 +00:00
parent 7098b65cb8
commit 2908f955d1
3 changed files with 33 additions and 12 deletions

View file

@ -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