airflow-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From twinkle sachdeva <twinkle.sachd...@gmail.com>
Subject retry handler not getting called
Date Thu, 27 Oct 2016 09:09:06 GMT
Hi,

I am working with a hiveToMySql transfer operation, which is not able to
connect and gives following logs:

HiveServer2Error: Failed after retrying 3 times

[2016-10-27 01:54:46,524] {models.py:1298} INFO - Marking task as
UP_FOR_RETRY


As per the code in the models.py,
https://github.com/apache/incubator-airflow/blob/master/airflow/models.py#L1347
, it should be calling the code for retry handler ( we are using version
1.7.1.3), but it is not happening.


Here is the relevant code snippet:


def my_retry_handler(context):

     print "my_retry_handler called"     slack_retry_notification =
SlackAPIPostOperator(         task_id='Slack_Failure_Notification',

         token="XXXXXX",

         channel='@yyyyyy',

         text=":skull: - {time} - {dag} attempt has been failed
".format(dag='Some Dag',time=datetime.now().strftime("%Y-%m-%d %H:%M:%S"),
),

         owner='Retry Handler')

     return slack_retry_notification.execute


hiveToMySql = HiveToMYSQLTransfer(sql="jdbsd", hiveserver2_conn_id='
hiveserver2_default',.........

            on_retry_callback=my_retry_handler)


Is there something i am missing?



Regards,

Twinkle

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message