fix(douyu): 修复斗鱼链路 P0/P1 隐患并增强 P2 运维队列可观测性
This commit is contained in:
@@ -10,6 +10,7 @@ from sqlalchemy.orm import Session
|
||||
from core.douyu import DouyuActivityClient
|
||||
|
||||
from ..models import Account, DouyuTask
|
||||
from .account_sync_service import lock_account_row
|
||||
from .business_events import record_gold_spent, record_points_credit
|
||||
from .douyu_activity_query import extract_points_expire_time, query_csrf
|
||||
|
||||
@@ -196,6 +197,8 @@ class DonateMixin:
|
||||
message += f",电竞积分: {account.esports_points}"
|
||||
# 电竞礼物同样产生积分到账 —— 这一类此前**从来不在收集范围**
|
||||
# (不在 COLLECTED_TASK_TYPES 里),时间线上一直是空白。
|
||||
if account.id is not None:
|
||||
lock_account_row(db, int(account.id))
|
||||
record_points_credit(
|
||||
db,
|
||||
account,
|
||||
@@ -334,6 +337,8 @@ class DonateMixin:
|
||||
# 旧收集器把「预期涨幅」当既成事实写进台账(未确认时也记 +980),
|
||||
# 那是把预期记成到账。这里宁可标清楚,也不假装它是确认过的数字。
|
||||
# 金额用本地可等价重算的值(1 个精英令 ≈ 10 分),不再依赖 result 里的字段。
|
||||
if account.id is not None:
|
||||
lock_account_row(db, int(account.id))
|
||||
record_points_credit(
|
||||
db,
|
||||
account,
|
||||
|
||||
Reference in New Issue
Block a user