舍弃flask。请求增加H2协议。
This commit is contained in:
@@ -169,7 +169,7 @@ class DeviceInfo:
|
||||
if getattr(self, "_add_executor", None) is None:
|
||||
from concurrent.futures import ThreadPoolExecutor
|
||||
import os
|
||||
max_workers = max(2, min(6, (os.cpu_count() or 4) // 2))
|
||||
max_workers = int(os.getenv("DEVICE_ADD_WORKERS", "6"))
|
||||
self._add_executor = ThreadPoolExecutor(
|
||||
max_workers=max_workers,
|
||||
thread_name_prefix="dev-add"
|
||||
|
||||
Reference in New Issue
Block a user