Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
A
airflow-dags-hub
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
唐香港
airflow-dags-hub
Commits
fee427a6
Commit
fee427a6
authored
Aug 27, 2019
by
唐香港
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update airflow_heartbeat_detection.py
parent
fabaa895
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
airflow_heartbeat_detection.py
dags/airflow/airflow_heartbeat_detection.py
+3
-3
No files found.
dags/airflow/airflow_heartbeat_detection.py
View file @
fee427a6
...
@@ -13,7 +13,7 @@ DING_PATH = '/opt/bitnami/airflow/dags/*/script/ding.sh'
...
@@ -13,7 +13,7 @@ DING_PATH = '/opt/bitnami/airflow/dags/*/script/ding.sh'
default_args
=
{
default_args
=
{
'owner'
:
'tangxianggang'
,
'owner'
:
'tangxianggang'
,
'depends_on_past'
:
False
,
'depends_on_past'
:
False
,
'start_date'
:
datetime
.
now
()
-
timedelta
(
minutes
=
6
0
),
'start_date'
:
datetime
.
now
()
-
timedelta
(
minutes
=
10
0
),
'retries'
:
3
,
'retries'
:
3
,
'retry_delay'
:
timedelta
(
seconds
=
5
)
'retry_delay'
:
timedelta
(
seconds
=
5
)
}
}
...
@@ -21,14 +21,14 @@ default_args = {
...
@@ -21,14 +21,14 @@ default_args = {
dag
=
DAG
(
dag
=
DAG
(
dag_id
=
'airflow_heartbeat_detection'
,
dag_id
=
'airflow_heartbeat_detection'
,
default_args
=
default_args
,
default_args
=
default_args
,
schedule_interval
=
timedelta
(
minutes
=
6
0
)
schedule_interval
=
timedelta
(
minutes
=
10
0
)
)
)
def
heartbeat_alarm
(
**
kwargs
):
def
heartbeat_alarm
(
**
kwargs
):
logging
.
info
(
'start heartbeat alarm'
)
logging
.
info
(
'start heartbeat alarm'
)
title
=
'airflow_heartbeat_detection'
title
=
'airflow_heartbeat_detection'
msg
=
'
\n
- I am airflow, I will notify you once every two hours.
\
msg
=
'
\n
- I am airflow, I will notify you once every two hours.
\
If I have not notified after
one hour
s, I have already hanged up.SOS...'
If I have not notified after
100 minute
s, I have already hanged up.SOS...'
message
=
'''I am airflow, I am still alive.!!!
message
=
'''I am airflow, I am still alive.!!!
\n
#### DAG_ID:
%
s
\n
#### DAG_ID:
%
s
\n
#### TASKID:
%
s
\n
#### TASKID:
%
s
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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