From 113cf8a0f53c8aafbad99e2c19f13e7048d6ca1a Mon Sep 17 00:00:00 2001 From: Andrei Matveyeu Date: Tue, 6 Aug 2024 13:55:44 +0200 Subject: [PATCH] Limit max number of connections to log area --- cli/src/etos_client/downloader/downloader.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cli/src/etos_client/downloader/downloader.py b/cli/src/etos_client/downloader/downloader.py index 335c9248..7d0458e0 100644 --- a/cli/src/etos_client/downloader/downloader.py +++ b/cli/src/etos_client/downloader/downloader.py @@ -195,7 +195,8 @@ def __print_traceback(self, value: Exception) -> None: def run(self) -> None: """Run the log downloader thread.""" self.started = True - with ThreadPool() as pool: + # 10 is the default max number of connections in Python requests library + with ThreadPool(10) as pool: while True: if self.__exit and not self.__clear_queue: self.logger.warning("Forced to exit without clearing the queue.")