From d3cb17597adfd580b2d32c3b414dce5d65faa0e5 Mon Sep 17 00:00:00 2001 From: Andrei Matveyeu Date: Thu, 8 Aug 2024 12:20:24 +0200 Subject: [PATCH] Limit max number of connections to log area (#250) --- 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 335c924..7d0458e 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.")