fix: 增加db.close(),解决抓取命令执行完不退出的问题
This commit is contained in:
parent
4f5f83d3fa
commit
c09f9fef68
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)
|
||||
|
|
Loading…
Reference in New Issue