From 55045dd4e0be4c60d3ee9e5435113f8d886c35bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AC=E6=98=8E?= <83812544+Ed1s0nZ@users.noreply.github.com> Date: Wed, 4 Mar 2026 00:18:29 +0800 Subject: [PATCH] Add files via upload --- internal/handler/agent.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/handler/agent.go b/internal/handler/agent.go index 0a5f1080..99fa0803 100644 --- a/internal/handler/agent.go +++ b/internal/handler/agent.go @@ -1444,7 +1444,8 @@ func (h *AgentHandler) executeBatchQueue(queueID string) { // 执行任务(使用包含角色提示词的finalMessage和角色工具列表) h.logger.Info("执行批量任务", zap.String("queueId", queueID), zap.String("taskId", task.ID), zap.String("message", task.Message), zap.String("role", queue.Role), zap.String("conversationId", conversationID)) - ctx, cancel := context.WithTimeout(context.Background(), 30*time.Minute) + // 单个子任务超时时间:从30分钟调整为6小时,适配长时间渗透/扫描任务 + ctx, cancel := context.WithTimeout(context.Background(), 6*time.Hour) // 存储取消函数,以便在取消队列时能够取消当前任务 h.batchTaskManager.SetTaskCancel(queueID, cancel) // 使用队列配置的角色工具列表(如果为空,表示使用所有工具)