优化服务号订单广播(Celery并发)与群聊状态实时推送

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
XingQue
2026-06-24 00:43:30 +08:00
parent 56c66846cc
commit 49ba67ecaf
9 changed files with 458 additions and 331 deletions

View File

@@ -10840,13 +10840,14 @@ class ZxkfghdsView(APIView):
# ---- 6.5 异步通知(广播新订单、跨平台同步) ----
try:
order_info = {
from utils.order_broadcast import submit_dingdan_guangbo
submit_dingdan_guangbo({
'dingdan_id': new_dingdan_id,
'game_type': self._get_game_type_name(new_order.leixing_id),
'amount': str(new_order.jine),
'order_desc': (new_order.jieshao or '')[:50],
}
dingdan_guangbo.delay(order_info)
'order_type': '商家派单',
})
except Exception as e:
logger.error(f"广播通知失败: {e}")