调整信号量大小,从 5 增加到 20,以提高并发任务的处理能力
All checks were successful
Sync Container Images / sync-images (push) Successful in 46s
All checks were successful
Sync Container Images / sync-images (push) Successful in 46s
This commit is contained in:
parent
44902487b0
commit
0dc0e5e135
2
sync.py
2
sync.py
@ -68,7 +68,7 @@ async def docker_build_task(dockerfile: str, target: str) -> int | None:
|
||||
return r
|
||||
return 0
|
||||
|
||||
semaphore = asyncio.Semaphore(5)
|
||||
semaphore = asyncio.Semaphore(20)
|
||||
|
||||
async def limited_task[T: Any](semaphore: asyncio.Semaphore, task: Callable[[], Coroutine[None, None, T]]) -> T:
|
||||
async with semaphore:
|
||||
|
Loading…
x
Reference in New Issue
Block a user