From 3a9da9cea0c66e32d064c2ad8384c4a8ce436893 Mon Sep 17 00:00:00 2001 From: autoantwort <41973254+autoantwort@users.noreply.github.com> Date: Mon, 2 Aug 2021 11:18:00 +0200 Subject: [PATCH] Don't set workers to 0 for webhooks (#20) The workers are used for the @run_async decorator and have nothing to do with the webhooks --- django_telegrambot/apps.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django_telegrambot/apps.py b/django_telegrambot/apps.py index 3b6843f..4f1f821 100644 --- a/django_telegrambot/apps.py +++ b/django_telegrambot/apps.py @@ -199,7 +199,7 @@ def ready(self): request = Request(proxy_url=bot.proxy['proxy_url'], urllib3_proxy_kwargs=bot.proxy['urllib3_proxy_kwargs']) bot.instance = telegram.Bot(token=bot.token, request=request) - bot.dispatcher = Dispatcher(bot.instance, None, workers=0, use_context=bot.use_context) + bot.dispatcher = Dispatcher(bot.instance, None, use_context=bot.use_context) if not settings.DJANGO_TELEGRAMBOT.get('DISABLE_SETUP', False): hookurl = '{}/{}/{}/'.format(webhook_site, webhook_base, bot.token) max_connections = b.get('WEBHOOK_MAX_CONNECTIONS', 40)