What am I doing wrong? Asyncio #4108
Unanswered
limzyishere
asked this question in
Q&A
Replies: 1 comment
-
You can very well adjust that. the side notes:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello! I tried to make it as easy to digest as possible. I am a beginner in both PTB and Asyncio so any help would be much appreciated.
File A
File B
Running File A will result in
Issue A
As I am using Bot, there is no option to adjust the connection pool size, ok so I have extracted from File C my Application object and added connection pool and pool timeout.
File C
This eliminates the above error. However I get a new error -
Issue B
I understand this has something to do with using threading that causes a new event loop to spawn, but where am I calling a new thread?
Also, how do I determine what is a good connection_pool_size and pool_timeout? I don't understand why Issue A happened when my asyncio.gather only contained 2 tasks.
Beta Was this translation helpful? Give feedback.
All reactions