Skip to content

Commit

Permalink
correct how params are passed for dags
Browse files Browse the repository at this point in the history
  • Loading branch information
eveleighoj committed Aug 15, 2024
1 parent f30e8ef commit 5b42b71
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions dags/collection_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,22 +42,21 @@
"memory": Param(32768, type="integer"),
"timeout": Param(480, type="integer")
},
render_template_as_native_obj=True
) as dag:
print(f'running with params:{dag.params}')
EcsRunTaskOperator(
task_id=f"{collection}-collection",
dag=dag,
execution_timeout=timedelta(minutes= "{{ params.timeout }}"),
execution_timeout=timedelta(minutes= dag.params['timeout']),
cluster=cluster_name,
task_definition="development-mwaa-collection-task",
launch_type="FARGATE",
overrides={
"containerOverrides": [
{
"name": "development-mwaa-collection-task",
'cpu': "{{ params.cpu }}",
'memory': "{{ params.memory }}",
'cpu': dag.params['cpu'],
'memory': dag.params['memory'],
"environment": [
{"name": "COLLECTION_NAME", "value": collection}
],
Expand Down

0 comments on commit 5b42b71

Please sign in to comment.