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-471740495 Same comment as above. On Mon, Mar 11, 2019 at 11:37 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_r264441396>: > > > + tries: Number of times to try (not retry) before giving up. > + delay: Initial delay between retries in seconds. > + backoff: Backoff multiplier (e.g. value of 2 will double the delay > + each retry). > + logger: Logger to use. If None, print. > + """ > + > + def deco_retry(f): > + @wraps(f) > + def f_retry(*args, **kwargs): > + mtries, mdelay = tries, delay > + while mtries > 1: > + try: > + return f(*args, **kwargs) > + except exceptions as e: > + msg = "{}, Retrying in {} seconds...".format(e, mdelay) > > You should avoid formatting string before passing to logger. > Reference: #4804 <https://github.com/apache/airflow/pull/4804> > > — > 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-213098767>, > or mute the thread > <https://github.com/notifications/unsubscribe-auth/AAIAcrylz2wV5tT85jc845EAPvSJ1vUBks5vVsypgaJpZM4bnTS4> > . >
---------------------------------------------------------------- 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
