Skip to content

Commit

Permalink
Add try/except for the example dag
Browse files Browse the repository at this point in the history
  • Loading branch information
ephraimbuddy committed Oct 6, 2021
1 parent c71f00a commit 4d708cd
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,14 @@ def load(total_order_value: float):
# [END main_flow]


# [START dag_invocation]
tutorial_etl_dag = tutorial_taskflow_api_etl_docker_virtualenv()
# [END dag_invocation]
# The try/except here is because Airflow versions less than 2.2.0 doesn't support
# @task.docker decorator and we use this dag in CI test. Thus, in order not to
# break the CI test, we added this try/except here.
try:
# [START dag_invocation]
tutorial_etl_dag = tutorial_taskflow_api_etl_docker_virtualenv()
# [END dag_invocation]
except AttributeError:
pass

# [END tutorial]

0 comments on commit 4d708cd

Please sign in to comment.