fix(login): 避免登录预算配置锁阻塞恢复任务

This commit is contained in:
yml
2026-11-28 22:00:58 +08:00
parent 63e44a419f
commit 53626e4c2c
4 changed files with 4 additions and 9 deletions
+1 -6
View File
@@ -204,12 +204,7 @@ def classify_login_category(
def _setting(db: Session) -> LoginQuotaSetting:
row = (
db.query(LoginQuotaSetting)
.filter(LoginQuotaSetting.id == 1)
.with_for_update()
.first()
)
row = db.query(LoginQuotaSetting).filter(LoginQuotaSetting.id == 1).first()
if row is None:
row = LoginQuotaSetting(id=1)
db.add(row)