mirror of
https://github.com/Ed1s0nZ/CyberStrikeAI.git
synced 2026-10-20 06:27:53 +02:00
fix: distinguish task deadlines from child operation timeouts
This commit is contained in:
1 parent
93e8684571
commit
5ff781bdb7
7 files changed
+134
-4
No files matched your search
@@ -385,7 +385,7 @@ func (h *AgentHandler) handleBatchSubTaskRunError(
|
||||
strings.Contains(strings.ToLower(errStr), "context canceled") ||
|
||||
strings.Contains(strings.ToLower(errStr), "context cancelled") ||
|
||||
(partialResp != "" && (strings.Contains(partialResp, "任务已被取消") || strings.Contains(partialResp, "任务执行中断")))
|
||||
isTimeout := errors.Is(runErr, context.DeadlineExceeded) || errors.Is(context.Cause(taskCtx), context.DeadlineExceeded)
|
||||
isTimeout := taskDeadlineExceeded(taskCtx)
|
||||
|
||||
if isTimeout {
|
||||
*finishStatus = "timeout"
|
||||
|
||||
Reference in new issue
Block a user