Skip to content

Commit

Permalink
Don't set workers to 0 for webhooks (#20)
Browse files Browse the repository at this point in the history
The workers are used for the @run_async decorator and have nothing to do with the webhooks
  • Loading branch information
autoantwort authored Aug 2, 2021
1 parent 76742ec commit 3a9da9c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion django_telegrambot/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 3a9da9c

Please sign in to comment.