diff --git a/conf/init/service/batch/manifestbackfillworker/log/run b/conf/init/service/batch/manifestbackfillworker/log/run new file mode 100755 index 000000000..de0b8e251 --- /dev/null +++ b/conf/init/service/batch/manifestbackfillworker/log/run @@ -0,0 +1,4 @@ +#!/bin/sh + +# Start the logger +exec logger -i -t manifestbackfillworker \ No newline at end of file diff --git a/conf/init/service/batch/manifestbackfillworker/run b/conf/init/service/batch/manifestbackfillworker/run new file mode 100755 index 000000000..4dc77e7f6 --- /dev/null +++ b/conf/init/service/batch/manifestbackfillworker/run @@ -0,0 +1,9 @@ +#! /bin/bash + +echo 'Starting manifest backfill worker' + +QUAYPATH=${QUAYPATH:-"."} +cd ${QUAYDIR:-"/"} +PYTHONPATH=$QUAYPATH venv/bin/python -m workers.manifestbackfillworker 2>&1 + +echo 'Repository manifest backfill exited' diff --git a/workers/manifestbackfillworker.py b/workers/manifestbackfillworker.py index 5183ae0f5..2fe3db8a6 100644 --- a/workers/manifestbackfillworker.py +++ b/workers/manifestbackfillworker.py @@ -15,6 +15,8 @@ from util.migrate.allocator import yield_random_entries logger = logging.getLogger(__name__) +WORKER_TIMEOUT = 600 + class BrokenManifest(ManifestInterface): """ Implementation of the ManifestInterface for "broken" manifests. This allows us to add the new manifest row while not adding any additional rows for it. @@ -55,7 +57,7 @@ class BrokenManifest(ManifestInterface): class ManifestBackfillWorker(Worker): def __init__(self): super(ManifestBackfillWorker, self).__init__() - self.add_operation(self._backfill_manifests, 1) + self.add_operation(self._backfill_manifests, WORKER_TIMEOUT) def _candidates_to_backfill(self): def missing_tmt_query():