Skip to content

Commit f7178ef

Browse files
committed
fix: handle error from GetExecSqlsByTaskIdAndStatus in action execution
1 parent c80ccf3 commit f7178ef

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sqle/server/sqled.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -400,9 +400,9 @@ func (a *action) execute() (err error) {
400400
}
401401
// update task status by sql
402402
// 验证task下所有的sql是否全部成功(工单中允许重新上线部分sql,所以需要验证全部sql是否成功)
403-
failedSqls, err := st.GetExecSqlsByTaskIdAndStatus(task.ID, []string{model.SQLExecuteStatusFailed, model.SQLExecuteStatusTerminateSucc})
404-
if err != nil {
405-
return err
403+
failedSqls, queryErr := st.GetExecSqlsByTaskIdAndStatus(task.ID, []string{model.SQLExecuteStatusFailed, model.SQLExecuteStatusTerminateSucc})
404+
if queryErr != nil {
405+
return queryErr
406406
}
407407
if len(failedSqls) > 0 {
408408
taskStatus = model.TaskStatusExecuteFailed

0 commit comments

Comments
 (0)