Last active
June 21, 2021 06:45
-
-
Save gecko655/5d553750aa3fcce86a05efb9515039c0 to your computer and use it in GitHub Desktop.
The file added by cloud composer when creating the environment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""A liveness prober dag for monitoring composer.googleapis.com/environment/healthy.""" | |
import airflow | |
from airflow import DAG | |
from airflow.operators.bash_operator import BashOperator | |
from datetime import timedelta | |
default_args = { | |
'start_date': airflow.utils.dates.days_ago(0), | |
'retries': 1, | |
'retry_delay': timedelta(minutes=5) | |
} | |
dag = DAG( | |
'airflow_monitoring', | |
default_args=default_args, | |
description='liveness monitoring dag', | |
schedule_interval=None, | |
dagrun_timeout=timedelta(minutes=60)) | |
# priority_weight has type int in Airflow DB, uses the maximum. | |
t1 = BashOperator( | |
task_id='echo', | |
bash_command='echo test', | |
dag=dag, | |
depends_on_past=False, | |
priority_weight=2**31-1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment