Skip to content

Commit f7357cc

Browse files
yokowuclaude
andcommitted
refactor: 移除 attachStream 中的 Resume 调用,改由 control 流统一触发
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent da0dfb4 commit f7357cc

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

backend/biz/task/handler/v1/task.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -376,17 +376,6 @@ func (h *TaskHandler) attachStream(ctx context.Context, cancel context.CancelCau
376376
taskID := task.ID.String()
377377
taskCreatedAt := time.Unix(task.CreatedAt, 0)
378378

379-
go func() {
380-
if err := h.taskflow.VirtualMachiner().Resume(ctx, &taskflow.ResumeVirtualMachineReq{
381-
HostID: task.VirtualMachine.Host.InternalID,
382-
UserID: task.UserID.String(),
383-
ID: taskID,
384-
EnvironmentID: task.VirtualMachine.EnvironmentID,
385-
}); err != nil {
386-
h.logger.With("task_id", task.ID.String(), "error", err).ErrorContext(ctx, "failed to resume task")
387-
}
388-
}()
389-
390379
// 先订阅实时流(触发 flush)
391380
streamCh := make(chan *taskflow.TaskChunk, 100)
392381
go func() {

0 commit comments

Comments
 (0)