[fetch_one(url) for url in URLS]
insert_tasks = []
while fetch_tasks:
done, fetch_tasks = await asyncio.wait(fetch_tasks, return_when=FIRST_COMPLETED)
if done:
insert_tasks.append(asyncio.create_task(insert(done.pop().result())))
await asyncio.wait(insert_tasks)
Попробую, спасибо
Обсуждают сегодня