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