Skip to content

Commit

Permalink
Merge pull request #23 from digital-land/regenerate_log_override
Browse files Browse the repository at this point in the history
Regenerate log override
  • Loading branch information
alexglasertpx authored Jan 13, 2025
2 parents 147cf33 + 572d256 commit 61e8d36
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dags/collection_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"transformed-jobs": Param(default=8, type="integer"),
"dataset-jobs": Param(default=8, type="integer"),
"incremental-loading-override": Param(default=False, type="boolean"),
"regenerate-log-override": Param(default=True, type="boolean"),
},
render_template_as_native_obj=True,
is_paused_upon_creation=False,
Expand Down Expand Up @@ -91,7 +92,8 @@
# {"name": "TRANSFORMED_JOBS", "value": str('{{ task_instance.xcom_pull(task_ids="configure-dag", key="transformed-jobs") | string }}')},
{"name": "TRANSFORMED_JOBS", "value":"'{{ task_instance.xcom_pull(task_ids=\"configure-dag\", key=\"transformed-jobs\") | string }}'"},
{"name": "DATASET_JOBS", "value": "'{{ task_instance.xcom_pull(task_ids=\"configure-dag\", key=\"dataset-jobs\") | string }}'"},
{"name": "INCREMENTAL_LOADING_OVERRIDE", "value": "'{{ task_instance.xcom_pull(task_ids=\"configure-dag\", key=\"incremental-loading-override\") | string }}'"}
{"name": "INCREMENTAL_LOADING_OVERRIDE", "value": "'{{ task_instance.xcom_pull(task_ids=\"configure-dag\", key=\"incremental-loading-override\") | string }}'"},
{"name": "REGENERATE_LOG_OVERRIDE", "value": "'{{ task_instance.xcom_pull(task_ids=\"configure-dag\", key=\"regenerate-log-override\") | string }}'"}
],
},
]
Expand Down
2 changes: 2 additions & 0 deletions dags/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ def configure_dag(**kwargs):
transformed_jobs = str(kwargs['params'].get('transformed-jobs'))
dataset_jobs = str(kwargs['params'].get('dataset-jobs'))
incremental_loading_override = bool(kwargs['params'].get('incremental-loading-override'))
regenerate_log_override = bool(kwargs['params'].get('regenerate-log-override'))

# get ecs-task logging configuration
ecs_client = boto3.client('ecs')
Expand All @@ -114,5 +115,6 @@ def configure_dag(**kwargs):
ti.xcom_push(key='collection-task-log-region', value=collection_task_log_region)
ti.xcom_push(key='collection-dataset-bucket-name', value=collection_dataset_bucket_name)
ti.xcom_push(key='incremental-loading-override', value=incremental_loading_override)
ti.xcom_push(key='regenerate-log-override', value=regenerate_log_override)

return configure_dag

0 comments on commit 61e8d36

Please sign in to comment.