mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2025-03-16 12:25:45 +01:00
dispatcher: add comment to describe the reason for conpool size
This commit is contained in:
parent
f0b2028e3f
commit
d192b385ea
1 changed files with 5 additions and 0 deletions
|
@ -121,6 +121,11 @@ class Dispatcher(object):
|
|||
if request.is_con_pool_initialized():
|
||||
raise RuntimeError('Connection Pool already initialized')
|
||||
|
||||
# we need a connection pool the size of:
|
||||
# * for each of the workers
|
||||
# * 1 for Dispatcher
|
||||
# * 1 for polling Updater (even if updater is webhook, we can spare a connection)
|
||||
# * 1 for JobQueue
|
||||
request.CON_POOL_SIZE = workers + 3
|
||||
for i in range(workers):
|
||||
thread = Thread(target=_pooled, name=str(i))
|
||||
|
|
Loading…
Add table
Reference in a new issue