dchaplinsky commented on issue #4891: [AIRFLOW-4067] Telegram hook/operator to 
post messages to telegram channels
URL: https://github.com/apache/airflow/pull/4891#issuecomment-471740368
 
 
   That's copy-paste from existing solution which I updated with the copyright
   and link.
   I can rewrite it probably, but this function isn't exposed anywhere.
   
   On Mon, Mar 11, 2019 at 11:36 PM Kamil Breguła <[email protected]>
   wrote:
   
   > *@mik-laj* commented on this pull request.
   > ------------------------------
   >
   > In airflow/contrib/hooks/telegram_hook.py
   > <https://github.com/apache/airflow/pull/4891#discussion_r264440960>:
   >
   > > @@ -0,0 +1,117 @@
   >
   > +import telegram
   >
   > +import time
   >
   > +from functools import wraps
   >
   > +from airflow.hooks.base_hook import BaseHook
   >
   > +from airflow.exceptions import AirflowException
   >
   > +
   >
   > +
   >
   > +def retry(exceptions, tries=4, delay=3, backoff=2, logger=None):
   >
   > +    """
   >
   > +    Retry calling the decorated function using an exponential backoff.
   >
   > +    (с) Eliot aka saltycrane, 
https://www.saltycrane.com/blog/2009/11/trying-out-retry-decorator-python/
   >
   > +
   >
   > +    Args:
   >
   >
   > We use a reStructuredText docstring style.
   >
   > —
   > You are receiving this because you were mentioned.
   > Reply to this email directly, view it on GitHub
   > <https://github.com/apache/airflow/pull/4891#pullrequestreview-213098227>,
   > or mute the thread
   > 
<https://github.com/notifications/unsubscribe-auth/AAIAcrrTJ-21BgyS2fYLQ5kJ4fhnKpesks5vVsxXgaJpZM4bnTS4>
   > .
   >
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to