You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Yu Ishikawa (JIRA)" <ji...@apache.org> on 2017/06/13 00:14:00 UTC

[jira] [Created] (AIRFLOW-1303) Slack post operator should be friendly to `on_failure_callback`

Yu Ishikawa created AIRFLOW-1303:
------------------------------------

             Summary: Slack post operator should be friendly to `on_failure_callback`
                 Key: AIRFLOW-1303
                 URL: https://issues.apache.org/jira/browse/AIRFLOW-1303
             Project: Apache Airflow
          Issue Type: Bug
          Components: operators
            Reporter: Yu Ishikawa


h2. Suggestion

In my view, we would like to use the slack post operator to notify error message when some tasks fail. Now, sending messages to slack is hacky a little with {{on_failure_callback}}. I understand we want to make `on_failure_callback` generic. However, we should write error handlings more naturally.

1. Add a method to handle failure in the slack post operator
{noformat}
# For example
slack_post_operator = SlackPostOperator(....)
operator1.on_failure_callback(slack_post_operator.handle_failure())
{noformat}
2. {{on_failure_callback}} support operator argument
{noformat}
# For example,
slack_post_operator = SlackPostOperator(....)
operator.on_failure_operator(slack_post_operator)
{noformat}

Apart from that, we should have a good example to use {{on_failure_callback}}.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)