Skip to content

修复:数据库就绪与 Tortoise 1.x 关闭连接#26

Merged
zCN24 merged 4 commits into
masterfrom
cursor/remove-legacy-plugin-entrypoint
May 13, 2026
Merged

修复:数据库就绪与 Tortoise 1.x 关闭连接#26
zCN24 merged 4 commits into
masterfrom
cursor/remove-legacy-plugin-entrypoint

Conversation

@Akiyy-Lab
Copy link
Copy Markdown
Member

Summary

  • permission_check 在访问数据库前 await DB.wait_until_ready(),避免 Tortoise 尚未初始化时出现 No TortoiseContext
  • DB.close 改为 await Tortoise.close_connections(),符合 Tortoise ORM 1.x 推荐用法。

Test plan

  • pdm run python -m unittest tests.test_maintenance

Made with Cursor

@zCN24 zCN24 marked this pull request as ready for review May 13, 2026 15:42
@zCN24 zCN24 self-requested a review May 13, 2026 15:43
Copy link
Copy Markdown
Contributor

@zCN24 zCN24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

审查通过,允许该PR合并

@zCN24 zCN24 merged commit cece932 into master May 13, 2026
5 checks passed
@zCN24 zCN24 deleted the cursor/remove-legacy-plugin-entrypoint branch May 13, 2026 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants