From 7697b6fb47eae6426a98940feab61e189cc94bcf Mon Sep 17 00:00:00 2001 From: lvxinyu-1117 Date: Fri, 8 Aug 2025 10:44:08 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20correct=20redis=20set=20when=20update=20?= =?UTF-8?q?node=20execution=20&&=20fix=20openAPI=20run=20=E2=80=A6=20(#639?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/application/workflow/workflow.go | 8 ++++++-- .../workflow/internal/repo/execute_history_store.go | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/backend/application/workflow/workflow.go b/backend/application/workflow/workflow.go index cc32d68e..64d4d8e7 100644 --- a/backend/application/workflow/workflow.go +++ b/backend/application/workflow/workflow.go @@ -1379,7 +1379,9 @@ func (w *ApplicationService) OpenAPIStreamRun(ctx context.Context, req *workflow } var appID, agentID *int64 - if req.IsSetProjectID() { + if req.IsSetAppID() { + appID = ptr.Of(mustParseInt64(req.GetAppID())) + } else if req.IsSetProjectID() { appID = ptr.Of(mustParseInt64(req.GetProjectID())) } if req.IsSetBotID() { @@ -1526,7 +1528,9 @@ func (w *ApplicationService) OpenAPIRun(ctx context.Context, req *workflow.OpenA } var appID, agentID *int64 - if req.IsSetProjectID() { + if req.IsSetAppID() { + appID = ptr.Of(mustParseInt64(req.GetAppID())) + } else if req.IsSetProjectID() { appID = ptr.Of(mustParseInt64(req.GetProjectID())) } if req.IsSetBotID() { diff --git a/backend/domain/workflow/internal/repo/execute_history_store.go b/backend/domain/workflow/internal/repo/execute_history_store.go index 12c9e1ca..d4214461 100644 --- a/backend/domain/workflow/internal/repo/execute_history_store.go +++ b/backend/domain/workflow/internal/repo/execute_history_store.go @@ -303,7 +303,7 @@ func (e *executeHistoryStoreImpl) UpdateNodeExecutionStreaming(ctx context.Conte key := fmt.Sprintf(nodeExecOutputKey, execution.ID) - if err := e.redis.Set(ctx, key, execution.Output, nodeExecDataExpiry).Err(); err != nil { + if err := e.redis.Set(ctx, key, *execution.Output, nodeExecDataExpiry).Err(); err != nil { return vo.WrapError(errno.ErrRedisError, err) }