Commit 89803127 authored by 김진영's avatar 김진영
Browse files

Update batch_test.py

parent bfe0dfa9
...@@ -19,12 +19,22 @@ def fail_alert(context): ...@@ -19,12 +19,22 @@ def fail_alert(context):
"sections": [ "sections": [
{ {
"facts":[ "facts":[
{"name":"TEST1", "value": "TEST1"} {"name":"■ Execution Time", "value": "{exec_date}"},
{"name":"■ Task", "value": "{task}"},
{"name":"■ DAG", "value": "{dag}"},
{"name":"■ Log URL", "value": "{log_url}"},
{"name":"■ Reason", "value":"{reason}"}
] ]
} }
] ]
} }
""" """.format(
exec_date=context.get('execution_date'),
task=context.get('task_instance').task_id,
dag=context.get('task_instance').dag_id,
log_url=context.get('task_instance').log_url,
reason=context.get('exception')
)
alert = BashOperator( alert = BashOperator(
task_id='fail_alert', task_id='fail_alert',
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment