From 3dd0bbcf934ea396e8512b8d5bb654b9f436c383 Mon Sep 17 00:00:00 2001 From: skipper70 Date: Sat, 1 May 2021 05:34:07 +0500 Subject: [PATCH] fix python-telegram-bot:latest warning && variable connection pool size --- config/template_config.toml | 2 ++ core.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/config/template_config.toml b/config/template_config.toml index eb1f00b..21ddc48 100644 --- a/config/template_config.toml +++ b/config/template_config.toml @@ -39,6 +39,8 @@ long_polling_timeout = 30 timed_out_pause = 1 # Time in seconds before retrying a request that returned an error error_pause = 5 +# Number of connections to keep in the connection pool +con_pool_size = 10 # General payment settings diff --git a/core.py b/core.py index ecacbcd..6f6119b 100644 --- a/core.py +++ b/core.py @@ -84,7 +84,7 @@ def main(): sed.DeferredReflection.prepare(engine) # Create a bot instance - bot = duckbot.factory(user_cfg)() + bot = duckbot.factory(user_cfg)(request=telegram.utils.request.Request(user_cfg["Telegram"]["con_pool_size"])) # Test the specified token log.debug("Testing bot token...")