Commit 48dbddfc authored by 김진영's avatar 김진영
Browse files

Update bc-mart.py

parent d77172e0
...@@ -25,15 +25,20 @@ with DAG( ...@@ -25,15 +25,20 @@ with DAG(
tags=['test'], tags=['test'],
catchup=False, catchup=False,
) as dag: ) as dag:
# (Task1) 헬스체크 # (Task1) Delay
delay = BashOperator(
task_id='delay',
bash_command="sleep 30"
)
# (Task2) 헬스체크
health_check = BashOperator( health_check = BashOperator(
task_id='health_check', task_id='health_check',
bash_command="sleep 30; curl -X GET -v {api_url}/api/v1/core/health \'-H accept: application/json\'".format( bash_command="curl -X GET -v {api_url}/api/v1/core/health \'-H accept: application/json\'".format(
api_url=Variable.get("INF_API_URL") api_url=Variable.get("INF_API_URL")
), ),
) )
# (Task2) mart 작업 병렬처리 # (Task3) mart 작업 병렬처리
post_mart_tasks = [] post_mart_tasks = []
for i, data in enumerate(martData): for i, data in enumerate(martData):
...@@ -52,4 +57,4 @@ with DAG( ...@@ -52,4 +57,4 @@ with DAG(
post_mart_tasks.append(post_mart_task) post_mart_tasks.append(post_mart_task)
# 작업 순서 정의 # 작업 순서 정의
health_check >> post_mart_tasks delay >> health_check >> post_mart_tasks
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment