From 6b1592f3f56e02d2eab5732fb49caeee7d3c3473 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sat, 7 Sep 2019 11:53:08 +0200 Subject: [PATCH] Don't retry network errors --- royalnet/bots/telegram.py | 5 ++--- royalnet/version.py | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/royalnet/bots/telegram.py b/royalnet/bots/telegram.py index dee2d610..c7e636ee 100644 --- a/royalnet/bots/telegram.py +++ b/royalnet/bots/telegram.py @@ -124,9 +124,8 @@ class TelegramBot(GenericBot): await asyncio.sleep(15) continue except telegram.error.NetworkError as error: - log.warning(f"Network error during {f.__qualname__} (retrying in 15s): {error}") - await asyncio.sleep(15) - continue + log.debug(f"Network error during {f.__qualname__} (skipping): {error}") + break except telegram.error.Unauthorized as error: log.info(f"Unauthorized to run {f.__qualname__} (skipping): {error}") break diff --git a/royalnet/version.py b/royalnet/version.py index 3c42ebb7..a6731da7 100644 --- a/royalnet/version.py +++ b/royalnet/version.py @@ -1 +1 @@ -semantic = "5.0a48" +semantic = "5.0a49"