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
4add65e5
Commit
4add65e5
authored
May 23, 2022
by
김진영
Browse files
Update bc-super.py
parent
48dbddfc
Changes
1
Hide whitespace changes
Inline
Side-by-side
bc-super.py
View file @
4add65e5
...
@@ -25,15 +25,21 @@ with DAG(
...
@@ -25,15 +25,21 @@ 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 70"
)
# (Task2) 헬스체크
health_check
=
BashOperator
(
health_check
=
BashOperator
(
task_id
=
'health_check'
,
task_id
=
'health_check'
,
bash_command
=
"
sleep 70;
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"
)
),
),
)
)
# (Task
2
) super 작업 병렬처리
# (Task
3
) super 작업 병렬처리
post_super_tasks
=
[]
post_super_tasks
=
[]
for
i
,
data
in
enumerate
(
superData
):
for
i
,
data
in
enumerate
(
superData
):
...
@@ -52,4 +58,4 @@ with DAG(
...
@@ -52,4 +58,4 @@ with DAG(
post_super_tasks
.
append
(
post_super_task
)
post_super_tasks
.
append
(
post_super_task
)
# 작업 순서 정의
# 작업 순서 정의
health_check
>>
post_super_tasks
delay
>>
health_check
>>
post_super_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