From a04658085b76974b4ec8cc5f4e35b93e3d7c4f96 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Mon, 27 Aug 2018 17:21:48 -0400 Subject: [PATCH] Add configuration flag to control whether we backfill manifests This will allow us to easily turn off the backfill once it is initially complete, but also reenable it if necessary --- workers/manifestbackfillworker.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/workers/manifestbackfillworker.py b/workers/manifestbackfillworker.py index 1d9be2992..391b1879c 100644 --- a/workers/manifestbackfillworker.py +++ b/workers/manifestbackfillworker.py @@ -1,5 +1,6 @@ import logging import logging.config +import time from peewee import JOIN, fn, IntegrityError @@ -197,5 +198,11 @@ def backfill_manifest(tag_manifest): if __name__ == "__main__": logging.config.fileConfig(logfile_path(debug=False), disable_existing_loggers=False) + + if not app.config.get('BACKFILL_TAG_MANIFESTS', False): + logger.debug('Manifest backfill disabled; skipping') + while True: + time.sleep(100000) + worker = ManifestBackfillWorker() worker.start()