Skip to content

Commit d192b38

Browse files
committed
dispatcher: add comment to describe the reason for conpool size
1 parent f0b2028 commit d192b38

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

telegram/ext/dispatcher.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,11 @@ def __init__(self, bot, update_queue, workers=4, exception_event=None, job_queue
121121
if request.is_con_pool_initialized():
122122
raise RuntimeError('Connection Pool already initialized')
123123

124+
# we need a connection pool the size of:
125+
# * for each of the workers
126+
# * 1 for Dispatcher
127+
# * 1 for polling Updater (even if updater is webhook, we can spare a connection)
128+
# * 1 for JobQueue
124129
request.CON_POOL_SIZE = workers + 3
125130
for i in range(workers):
126131
thread = Thread(target=_pooled, name=str(i))

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy