Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
김진영
airflow-test
Commits
48dbddfc
Commit
48dbddfc
authored
May 23, 2022
by
김진영
Browse files
Update bc-mart.py
parent
d77172e0
Changes
1
Hide whitespace changes
Inline
Side-by-side
bc-mart.py
View file @
48dbddfc
...
...
@@ -25,15 +25,20 @@ with DAG(
tags
=
[
'test'
],
catchup
=
False
,
)
as
dag
:
# (Task1) 헬스체크
# (Task1) Delay
delay
=
BashOperator
(
task_id
=
'delay'
,
bash_command
=
"sleep 30"
)
# (Task2) 헬스체크
health_check
=
BashOperator
(
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"
)
),
)
# (Task
2
) mart 작업 병렬처리
# (Task
3
) mart 작업 병렬처리
post_mart_tasks
=
[]
for
i
,
data
in
enumerate
(
martData
):
...
...
@@ -52,4 +57,4 @@ with DAG(
post_mart_tasks
.
append
(
post_mart_task
)
# 작업 순서 정의
health_check
>>
post_mart_tasks
delay
>>
health_check
>>
post_mart_tasks
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment