Openverse is a search engine for openly-licensed media. This monorepo includes all application code.
Ensure data refresh can still be run if no initial index exist (#2727)
sruthiv9883ce3eae8d8b
diff --git a/catalog/dags/data_refresh/data_refresh_task_factory.py b/catalog/dags/data_refresh/data_refresh_task_factory.pyindex d735e5753..45f80cfdd 100644--- a/catalog/dags/data_refresh/data_refresh_task_factory.py+++ b/catalog/dags/data_refresh/data_refresh_task_factory.py@@ -54,6 +54,7 @@ from airflow.operators.python import PythonOperatorfrom airflow.sensors.external_task import ExternalTaskSensorfrom airflow.utils.state import Statefrom airflow.utils.task_group import TaskGroup+from airflow.utils.trigger_rule import TriggerRulefrom common import ingestion_serverfrom common.constants import REFRESH_POKE_INTERVAL, XCOM_PULL_TEMPLATE@@ -147,7 +148,9 @@ def create_data_refresh_task_group(# Generate a UUID suffix that will be used by the newly created index.generate_index_suffix = PythonOperator(- task_id="generate_index_suffix", python_callable=lambda: uuid.uuid4().hex+ task_id="generate_index_suffix",+ python_callable=lambda: uuid.uuid4().hex,+ trigger_rule=TriggerRule.NONE_FAILED,)tasks.append(generate_index_suffix)