Skip to content

Commit 95d93e6

Browse files
authored
feat: ability to set worker count (#1098)
1 parent ac17b54 commit 95d93e6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/writer/app_runner.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,8 +615,9 @@ def _handle_app_process_server_packet(self, packet: AppProcessServerRequestPacke
615615
thread_pool_future.add_done_callback(self._send_packet)
616616

617617
def run(self) -> None:
618+
max_workers = int(os.getenv("WRITER_MAX_WORKERS", (os.cpu_count() or 4) * 10))
618619
self.executor = concurrent.futures.ThreadPoolExecutor(
619-
max_workers=(os.cpu_count() or 4) * 10
620+
max_workers=max_workers,
620621
)
621622
self.server_conn_lock = threading.Lock()
622623
self.client_conn.close()

0 commit comments

Comments
 (0)