fix(login): 避免登录预算配置锁阻塞恢复任务
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# 直播账号运营后台
|
||||
|
||||
斗鱼 / 虎牙账号运营 Web 平台:批量登录拿 Cookie、按工作台跑活动任务、应用宝点券充值。版本见 `pyproject.toml`(当前 0.4.15)。
|
||||
斗鱼 / 虎牙账号运营 Web 平台:批量登录拿 Cookie、按工作台跑活动任务、应用宝点券充值。版本见 `pyproject.toml`(当前 0.4.16)。
|
||||
|
||||
## 能做什么
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "live-hub-py"
|
||||
version = "0.4.15"
|
||||
version = "0.4.16"
|
||||
description = "直播账号运营 Web 后台"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.12,<3.13"
|
||||
|
||||
@@ -381,7 +381,7 @@ wheels = [
|
||||
|
||||
[[package]]
|
||||
name = "live-hub-py"
|
||||
version = "0.4.15"
|
||||
version = "0.4.16"
|
||||
source = { editable = "." }
|
||||
dependencies = [
|
||||
{ name = "alembic" },
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user