调整并发任务的限流机制,将信号量从 5 更改为 1,以控制同时执行的任务数量
All checks were successful
Sync Container Images / sync-images (push) Successful in 1m48s
All checks were successful
Sync Container Images / sync-images (push) Successful in 1m48s
This commit is contained in:
parent
30a1b7de6a
commit
bd273e0ec1
2
sync.py
2
sync.py
@ -39,7 +39,7 @@ async def docker_push(image: str) -> int | None:
|
|||||||
print(f"Pushing image {image}...")
|
print(f"Pushing image {image}...")
|
||||||
return await run_command(f"docker push {image}")
|
return await run_command(f"docker push {image}")
|
||||||
|
|
||||||
semaphore = asyncio.Semaphore(5)
|
semaphore = asyncio.Semaphore(1)
|
||||||
|
|
||||||
async def limited_task(task):
|
async def limited_task(task):
|
||||||
async with semaphore:
|
async with semaphore:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user