diff --git a/bbot/core/engine.py b/bbot/core/engine.py index e3485df525..01b805c1fc 100644 --- a/bbot/core/engine.py +++ b/bbot/core/engine.py @@ -65,7 +65,7 @@ def unpickle(self, binary): async def _infinite_retry(self, callback, *args, **kwargs): interval = kwargs.pop("_interval", 300) context = kwargs.pop("_context", "") - # default overall timeout of 5 minutes (15 second interval * 20 iterations) + # default overall timeout of 10 minutes (300 second interval * 2 iterations) max_retries = kwargs.pop("_max_retries", 1) if not context: context = f"{callback.__name__}({args}, {kwargs})" @@ -77,7 +77,7 @@ async def _infinite_retry(self, callback, *args, **kwargs): self.log.debug(f"{self.name}: Timeout after {interval:,} seconds {context}, retrying...") retries += 1 if max_retries is not None and retries > max_retries: - raise TimeoutError(f"Timed out after {max_retries*interval:,} seconds {context}") + raise TimeoutError(f"Timed out after {(max_retries+1)*interval:,} seconds {context}") def engine_debug(self, *args, **kwargs): if self._engine_debug: diff --git a/bbot/core/helpers/web/client.py b/bbot/core/helpers/web/client.py index f72dcab5d6..9cbc418a6b 100644 --- a/bbot/core/helpers/web/client.py +++ b/bbot/core/helpers/web/client.py @@ -72,7 +72,7 @@ def __init__(self, *args, **kwargs): proxies = self._web_config.get("http_proxy", None) kwargs["proxies"] = proxies - log.debug(f"Creating httpx.AsyncClient({args}, {kwargs})") + log.critical(f"Creating httpx.AsyncClient({args}, {kwargs})") super().__init__(*args, **kwargs) if not self._persist_cookies: self._cookies = DummyCookies() diff --git a/bbot/core/helpers/web/engine.py b/bbot/core/helpers/web/engine.py index b349d11fa6..70fc209319 100644 --- a/bbot/core/helpers/web/engine.py +++ b/bbot/core/helpers/web/engine.py @@ -44,6 +44,7 @@ def AsyncClient(self, *args, **kwargs): try: return self.web_clients[retries] except KeyError: + log.critical('CREATING CLIENT') from .client import BBOTAsyncClient client = BBOTAsyncClient.from_config(self.config, self.target, *args, **kwargs)