mirror of
https://github.com/NanmiCoder/MediaCrawler.git
synced 2026-03-04 05:00:47 +08:00
fix: 增加db.close(),解决抓取命令执行完不退出的问题
This commit is contained in:
2
db.py
2
db.py
@@ -18,6 +18,8 @@ async def init_db(create_db: bool = False) -> None:
|
||||
_create_db=create_db
|
||||
)
|
||||
|
||||
async def close() -> None:
|
||||
await Tortoise.close_connections()
|
||||
|
||||
async def init():
|
||||
await init_db(create_db=True)
|
||||
|
||||
Reference in New Issue
Block a user