modify: aibox_sophon_adapter plugins

This commit is contained in:
2026-07-27 14:28:07 +08:00
parent 2b7b8ee08c
commit 79eb7fe5cc
23 changed files with 1380 additions and 61 deletions
+20
View File
@@ -0,0 +1,20 @@
"""
心跳 MQTT 端点 — 仅上报,无需响应
通过 MQTT 主题 chongming/example/heartbeat 发送心跳,
Worker 返回 None,MQTT Bridge 不发布响应。
"""
import time
from chongming_worker import rpc_method
@rpc_method(
subject="example.heartbeat",
method="MQTT",
summary="Heartbeat ping via MQTT (no response)",
)
async def heartbeat(worker_id: str = "") -> None:
"""心跳上报 — 无返回值,MQTT Bridge 跳过响应发布"""
print(f"[Heartbeat] worker={worker_id} time={time.time()}")
return None # 显式返回 None,MQTT Bridge 不发布响应