|
|
@ -68,6 +68,7 @@ class WebSocketAdapter: |
|
|
|
|
|
|
|
|
async def _send_loop(self): |
|
|
async def _send_loop(self): |
|
|
"""发送循环:优先处理优先级Channel,其次处理普通出站Channel""" |
|
|
"""发送循环:优先处理优先级Channel,其次处理普通出站Channel""" |
|
|
|
|
|
logger.debug(f"发送循环启动: {self.client.name} (out:{self.outbound_channel.name} / in:{self.inbound_channel.name})") |
|
|
try: |
|
|
try: |
|
|
# 优先级Channel命名约定:f"{outbound}_priority";不存在则仅用普通通道 |
|
|
# 优先级Channel命名约定:f"{outbound}_priority";不存在则仅用普通通道 |
|
|
priority_channel_name = f"{self.outbound_channel.name}_priority" |
|
|
priority_channel_name = f"{self.outbound_channel.name}_priority" |
|
|
@ -166,6 +167,7 @@ class WebSocketAdapter: |
|
|
|
|
|
|
|
|
async def _heartbeat_loop(self): |
|
|
async def _heartbeat_loop(self): |
|
|
"""心跳循环:以优先级消息写入,并由发送循环优先处理""" |
|
|
"""心跳循环:以优先级消息写入,并由发送循环优先处理""" |
|
|
|
|
|
logger.debug(f"心跳循环启动: {self.client.name} (out:{self.outbound_channel.name} / in:{self.inbound_channel.name}) 间隔:{self.heartbeat_interval}秒") |
|
|
try: |
|
|
try: |
|
|
priority_channel_name = f"{self.outbound_channel.name}_priority" |
|
|
priority_channel_name = f"{self.outbound_channel.name}_priority" |
|
|
from app.core.websocket.manager import websocket_manager |
|
|
from app.core.websocket.manager import websocket_manager |
|
|
|