Thanks for the info. I’ll look into sending a PR for the callback option.

Casey

On October 31, 2016 at 3:38:37 PM, siddharth anand ([email protected]) wrote:

*Today*  
You would need to add 2 new tasks in a chain to the end of your current  
dag, your_dag --> ShortCircuitOperator --> PythonOperator. The  
ShortCircuitOperator will need to specify a trigger rule of *all_done *to  
ensure it's always called. Then, specify a python callable that checks the  
status of upstream tasks for success. If all direct upstream tasks are  
successful, skip the last task. If not, then execute the last task which  
would carry out the failure notification that you desire.  

*Future*  
Implement an on-failure callback. Have a look at how dag.sla_miss_callback is  
implemented!  

-s  

On Mon, Oct 31, 2016 at 3:24 PM, Casey Ching <[email protected]> wrote:  

> Hello,  
>  
> I’d like the ability to send notifications when a DAG fails. Basically the  
> same as on_failure_callback that is available for operators but for a DAG  
> instead. Is there a way to do that now?  
>  
> Thanks,  
> Casey  
>  

Reply via email to