Increase BATCH_MAX_WORKERS and Pool concurrency from 20 to 100

This commit is contained in:
YueGuobin 2026-06-16 00:49:08 +08:00
parent 286b2407cd
commit 74192f454f
No known key found for this signature in database
3 changed files with 4 additions and 4 deletions

View File

@ -31,7 +31,7 @@ from gns3server.services import auth_service
log = logging.getLogger(__name__)
BATCH_MAX_WORKERS = 10
BATCH_MAX_WORKERS = 100
# ── Helper ─────────────────────────────────────────────────────────────────

View File

@ -31,7 +31,7 @@ from gns3server.services import auth_service
log = logging.getLogger(__name__)
BATCH_MAX_WORKERS = 10
BATCH_MAX_WORKERS = 100
# ── Constants ──────────────────────────────────────────────────────────────

View File

@ -1296,7 +1296,7 @@ class Project:
# Create nodes in parallel with limited concurrency
# to avoid overwhelming the system with too many simultaneous operations
pool = Pool(concurrency=20)
pool = Pool(concurrency=100)
for compute, name, node_id, node_data in nodes_to_create:
pool.append(self.add_node, compute, name, node_id, dump=False, **node_data)
await pool.join()
@ -1314,7 +1314,7 @@ class Project:
if count > 0:
await self.preallocate_udp_ports_for_compute(compute, count)
# Create links in parallel for improved performance
pool = Pool(concurrency=20)
pool = Pool(concurrency=100)
for link_data in topology.get("links", []):
if "link_id" not in link_data.keys():
continue