Skip to content

Commit 41b0cdb

Browse files
Determine data refresh pool by environment variable with default (#2352)
1 parent c20f275 commit 41b0cdb

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

catalog/dags/data_refresh/data_refresh_task_factory.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
logger = logging.getLogger(__name__)
6666

6767

68-
DATA_REFRESH_POOL = "data_refresh"
68+
DATA_REFRESH_POOL = os.getenv("DATA_REFRESH_POOL", "data_refresh")
6969

7070

7171
def create_data_refresh_task_group(

catalog/env.template

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,9 @@ OPENVERSE_BUCKET=openverse-storage
106106
# Seconds to wait before poking for availability of the data refresh pool when running a data_refresh
107107
# DAG. Used to shorten the time for testing purposes.
108108
DATA_REFRESH_POKE_INTERVAL=5
109+
# The pool to use for the data refresh tasks. Defaults to `data_refresh` in production but
110+
# we override this locally to prevent having to frequently recreate it.
111+
DATA_REFRESH_POOL=default_pool
109112
# Number of Retries if DAG task fails to run
110113
DEFAULT_RETRY_COUNT = 2
111114
# Whether to enable catchup for dated DAGs, allowing automatic backfill.

0 commit comments

Comments
 (0)