@@ -78,11 +78,15 @@ import (
7878// @Description [{"port":0,"status":"string","process":"string","forward_id":"string?","access_url":"string?","label":"string?","error_message":"string?","whitelist_ips":["string"]}]
7979// @Description ```
8080// @Description
81- // @Description ### Type=call, Kind=restart — 重启任务(无 call-response 返回)
81+ // @Description ### Type=call, Kind=restart — 重启任务
8282// @Description 请求 Data:
8383// @Description ```json
8484// @Description {"request_id":"string?","load_session":true}
8585// @Description ```
86+ // @Description 响应 Data:
87+ // @Description ```json
88+ // @Description {"id":"uuid","request_id":"string?","success":true,"message":"string","session_id":"string"}
89+ // @Description ```
8690// @Description
8791// @Description ### Type=sync-my-ip — 同步 Web 客户端真实 IP
8892// @Description 请求 Data:
@@ -92,7 +96,7 @@ import (
9296// @Description
9397// @Description ## 下行消息
9498// @Description
95- // @Description - Type=call-response: 同步请求响应(Kind 与请求一致,restart 除外 )。失败时 Data 为:
99+ // @Description - Type=call-response: 同步请求响应(Kind 与请求一致)。失败时 Data 为:
96100// @Description ```json
97101// @Description {"error":"string"}
98102// @Description ```
@@ -238,6 +242,7 @@ func (h *TaskHandler) controlReadMessages(ctx context.Context, wsConn *ws.Websoc
238242 logger .WarnContext (ctx , "failed to unmarshal control message" , "error" , err , "data" , string (d ))
239243 continue
240244 }
245+ h .logger .With ("task req" , m , "task_id" , task .ID ).DebugContext (ctx , "recv task message" )
241246
242247 switch m .Type {
243248 case consts .TaskStreamTypeCall :
@@ -262,6 +267,7 @@ func (h *TaskHandler) handleControlCall(ctx context.Context, wsConn *ws.Websocke
262267 logger .WarnContext (ctx , "failed to unmarshal restart task" , "error" , err )
263268 return
264269 }
270+ h .logger .With ("restart" , req , "task_id" , task .ID ).DebugContext (ctx , "recv restart call" )
265271 req .ID = task .ID
266272 result , err = h .taskflow .TaskManager ().Restart (ctx , req )
267273
0 commit comments