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
5823e9e6
Commit
5823e9e6
authored
Aug 30, 2019
by
唐香港
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update airflow_heartbeat_detection.py
parent
125ba045
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
airflow_heartbeat_detection.py
dags/airflow/airflow_heartbeat_detection.py
+4
-4
No files found.
dags/airflow/airflow_heartbeat_detection.py
View file @
5823e9e6
...
@@ -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
=
10
0
),
'start_date'
:
datetime
.
now
()
-
timedelta
(
minutes
=
26
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
=
5
0
)
schedule_interval
=
timedelta
(
minutes
=
13
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
5
0 minutes.
\
msg
=
'
\n
- I am airflow, I will notify you once every
13
0 minutes.
\
If I have not notified after
5
0 minutes, I have already hanged up.SOS...'
If I have not notified after
13
0 minutes, 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