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 -1
View File
@@ -1,6 +1,6 @@
# 直播账号运营后台 # 直播账号运营后台
斗鱼 / 虎牙账号运营 Web 平台:批量登录拿 Cookie、按工作台跑活动任务、应用宝点券充值。版本见 `pyproject.toml`(当前 0.4.15)。 斗鱼 / 虎牙账号运营 Web 平台:批量登录拿 Cookie、按工作台跑活动任务、应用宝点券充值。版本见 `pyproject.toml`(当前 0.4.16)。
## 能做什么 ## 能做什么
+1 -1
View File
@@ -1,6 +1,6 @@
[project] [project]
name = "live-hub-py" name = "live-hub-py"
version = "0.4.15" version = "0.4.16"
description = "直播账号运营 Web 后台" description = "直播账号运营 Web 后台"
readme = "README.md" readme = "README.md"
requires-python = ">=3.12,<3.13" requires-python = ">=3.12,<3.13"
Generated
+1 -1
View File
@@ -381,7 +381,7 @@ wheels = [
[[package]] [[package]]
name = "live-hub-py" name = "live-hub-py"
version = "0.4.15" version = "0.4.16"
source = { editable = "." } source = { editable = "." }
dependencies = [ dependencies = [
{ name = "alembic" }, { name = "alembic" },
+1 -6
View File
@@ -204,12 +204,7 @@ def classify_login_category(
def _setting(db: Session) -> LoginQuotaSetting: def _setting(db: Session) -> LoginQuotaSetting:
row = ( row = db.query(LoginQuotaSetting).filter(LoginQuotaSetting.id == 1).first()
db.query(LoginQuotaSetting)
.filter(LoginQuotaSetting.id == 1)
.with_for_update()
.first()
)
if row is None: if row is None:
row = LoginQuotaSetting(id=1) row = LoginQuotaSetting(id=1)
db.add(row) db.add(row)