修正任务完成信息的打印逻辑,移除重复输出
All checks were successful
Sync Container Images / sync-images (push) Successful in 2m20s
All checks were successful
Sync Container Images / sync-images (push) Successful in 2m20s
This commit is contained in:
3
sync.py
3
sync.py
@ -98,9 +98,10 @@ async def main():
|
|||||||
for result in results:
|
for result in results:
|
||||||
if result is not None and result != 0:
|
if result is not None and result != 0:
|
||||||
failed_tasks += 1
|
failed_tasks += 1
|
||||||
|
print(f"{len(results)} tasks completed. {len(results) - failed_tasks} succeed, {failed_tasks} failed.")
|
||||||
if failed_tasks > 0:
|
if failed_tasks > 0:
|
||||||
raise Exception(f"{failed_tasks} tasks failed.")
|
raise Exception(f"{failed_tasks} tasks failed.")
|
||||||
print(f"{len(results)} tasks completed. {len(results) - failed_tasks} succeed, {failed_tasks} failed.")
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
asyncio.run(main())
|
asyncio.run(main())
|
Reference in New Issue
Block a user