fix(douyu): 修复斗鱼链路 P0/P1 隐患并增强 P2 运维队列可观测性

This commit is contained in:
yml
2026-11-29 14:10:24 +08:00
parent be7146a9ef
commit d12d9e02b3
51 changed files with 2510 additions and 561 deletions
+3
View File
@@ -18,6 +18,7 @@ from .account_binding import (
SCOPE_PEACE,
set_bind_status,
)
from .account_sync_service import lock_account_row
from .business_events import record_exchange
from .douyu_activity_query import (
query_xpd_bind_info,
@@ -597,6 +598,8 @@ class XpdMixin:
# 和平小店兑换 —— 此前从不发事件(不在旧收集器的 allowlist 里)。
# 消耗的是点券或扭蛋碎片,不是积分;金额用本地已知的 price(快照标价,
# 已在上面校验过 > 0),作用域标成 peace 以便和精英/电竞区分。
if account.id is not None:
lock_account_row(db, int(account.id))
record_exchange(
db,
account,