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
af879117
Commit
af879117
authored
Jun 20, 2022
by
김진영
Browse files
Add new file
parent
844a499b
Changes
1
Hide whitespace changes
Inline
Side-by-side
test-curl.py
0 → 100644
View file @
af879117
from
datetime
import
datetime
,
timedelta
from
textwrap
import
dedent
import
pendulum
from
airflow.operators.bash
import
BashOperator
from
airflow
import
DAG
from
airflow.models
import
Variable
# set timezone
local_tz
=
pendulum
.
timezone
(
"Asia/Seoul"
)
# set dag
with
DAG
(
'test-curl'
,
default_args
=
{
'depends_on_past'
:
False
,
'email'
:
'kim-jy@lotte.net'
,
},
description
=
'dag for gasan batch jobs'
,
schedule_interval
=
'*/1 * * * *'
,
start_date
=
datetime
(
2022
,
6
,
20
,
tzinfo
=
local_tz
),
tags
=
[
'test'
],
catchup
=
False
,
)
as
dag
:
# (Task1) 헬스체크
health_check
=
BashOperator
(
task_id
=
'health_check'
,
bash_command
=
"curl -X GET -v 10.102.138.238:8001/api/v1/core/health
\'
-H accept: application/json
\'
"
,
)
# 작업 순서 정의
health_check
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