airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Divya Bairavarasu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AIRFLOW-36) Email on failure not working Airflow
Date Tue, 03 May 2016 16:00:14 GMT

    [ https://issues.apache.org/jira/browse/AIRFLOW-36?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15268942#comment-15268942
] 

Divya Bairavarasu commented on AIRFLOW-36:
------------------------------------------

Ya my bad will take care.Closing the issue.


> Email on failure not working Airflow
> ------------------------------------
>
>                 Key: AIRFLOW-36
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-36
>             Project: Apache Airflow
>          Issue Type: Bug
>         Environment: CentOS
>            Reporter: Divya Bairavarasu
>
> Following is my code:
> from airflow import DAG
> from airflow.operators import BashOperator
> from datetime import datetime, timedelta
> default_args = {
>     'owner': 'airflow',
>     'start_date': datetime.now()-timedelta(minutes=5),
>     'email': ['divya.h@gmail.com'],
>     'email_on_failure': True,
>     'email_on_retry': True,
>     'sla':datetime.now()-timedelta(seconds=60),
>     'retries': 1,
>     'retry_delay': timedelta(seconds=60)
> }
> dag = DAG('mysql_test', default_args=default_args)
> hdfs_copy = """
> cd /root/airflow/scripts/
> ./sqoop_import.sh
> """
> # Importing the data from Mysql table to HDFS
> task1 = BashOperator(
>         task_id= 'hdfs_copy',
>         bash_command=hdfs_copy,
>         dag=dag
> )
> # Inserting the data from Hive external table to the target mysql table
> mysql_copy= """
>  cd /root/airflow/scripts/
>  ./sqoop_export.sh
> """
> task2 = BashOperator(
>         task_id= 'mysql_copy',
>         bash_command=mysql_copy,
>         depends_on_past=True,
>         dag=dag
> )
> # defining the job dependency
> task2.set_upstream(task1)
> The task1 and task2 both fail.I am not receiving any email alerts 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message