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
@@ -527,8 +527,7 @@ def _find_reusable_same_role_target(
PlatformFulfillmentTask.id != int(task.id),
PlatformFulfillmentTask.account_id.isnot(None),
PlatformFulfillmentTask.execution_status != "cancelled",
func.lower(func.trim(PlatformFulfillmentTask.customer_role_name))
== role.casefold(),
PlatformFulfillmentTask.customer_role_norm == role.strip().casefold(),
)
.order_by(
case((PlatformFulfillmentTask.lease_id.isnot(None), 0), else_=1),