Skip to content

Commit 29e7c64

Browse files
committed
remove: Re-execution does not require im notification and unused chan
1 parent f7178ef commit 29e7c64

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

sqle/api/controller/v1/workflow.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import (
2020
"github.com/actiontech/sqle/sqle/errors"
2121
"github.com/actiontech/sqle/sqle/log"
2222
"github.com/actiontech/sqle/sqle/model"
23-
"github.com/actiontech/sqle/sqle/pkg/im"
2423
"github.com/actiontech/sqle/sqle/server"
2524
"github.com/actiontech/sqle/sqle/utils"
2625

@@ -1404,8 +1403,6 @@ func ReExecuteTaskOnWorkflowV1(c echo.Context) error {
14041403
return controller.JSONBaseErrorReq(c, err)
14051404
}
14061405

1407-
im.UpdateApprove(workflow.WorkflowId, user, model.ApproveStatusAgree, "")
1408-
14091406
return c.JSON(http.StatusOK, controller.NewBaseReq(nil))
14101407
}
14111408

sqle/server/workflow.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,13 @@ func ReExecuteTaskSQLs(workflow *model.Workflow, task *model.Task, execSqlIds []
5454
if err != nil {
5555
return err
5656
}
57-
workflowStatusChan := make(chan string, 1)
5857
var lock sync.Mutex
5958
go func() {
6059
sqledServer := GetSqled()
6160
task, err := sqledServer.AddTaskWaitResultWithSQLIds(string(workflow.ProjectId), strconv.Itoa(int(task.ID)), execSqlIds, ActionTypeExecute)
62-
{ // NOTE: Update the workflow status before sending notifications to ensure that the notification content reflects the latest information.
61+
{
6362
lock.Lock()
64-
updateStatus(s, workflow, l, workflowStatusChan)
63+
updateStatus(s, workflow, l, nil)
6564
lock.Unlock()
6665
}
6766
if err != nil || task.Status == model.TaskStatusExecuteFailed {

0 commit comments

Comments
 (0)