""" @author: luojunhui """ import time import datetime import asyncio from applications.db import AsyncMySQLClient from tasks.new_contentId_task import NewContentIdTask async def main_job(): """ main job :return: """ async with AsyncMySQLClient() as long_articles_pool, AsyncMySQLClient(aigc=True) as aigc_pool: new_content_id_task = NewContentIdTask(long_articles_pool, aigc_pool) await new_content_id_task.deal() if __name__ == '__main__': while True: asyncio.run(main_job()) now_str = datetime.datetime.now().__str__() print("{} 请求执行完成, 等待60s".format(now_str)) time.sleep(60)