调整导入顺序,优化代码结构
All checks were successful
Sync Container Images / sync-images (push) Successful in 40s
All checks were successful
Sync Container Images / sync-images (push) Successful in 40s
This commit is contained in:
parent
ffc326a940
commit
7a69524e91
6
sync.py
6
sync.py
@ -1,8 +1,9 @@
|
|||||||
import asyncio
|
import asyncio
|
||||||
from typing import Any, Callable, Coroutine
|
|
||||||
from functools import partial
|
|
||||||
import aiofiles
|
import aiofiles
|
||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
|
from typing import Any, Callable, Coroutine
|
||||||
|
from functools import partial
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel
|
||||||
|
|
||||||
class Config(BaseModel):
|
class Config(BaseModel):
|
||||||
@ -74,7 +75,6 @@ async def limited_task[T: Any](semaphore: asyncio.Semaphore, task: Callable[[],
|
|||||||
async with semaphore:
|
async with semaphore:
|
||||||
return await task()
|
return await task()
|
||||||
|
|
||||||
|
|
||||||
async def main():
|
async def main():
|
||||||
async with aiofiles.open('images.yaml', 'r') as file:
|
async with aiofiles.open('images.yaml', 'r') as file:
|
||||||
config = await file.read()
|
config = await file.read()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user