Skip to content

Commit

Permalink
Merge pull request #2557 from actiontech/reset_priority
Browse files Browse the repository at this point in the history
reset sql priority
  • Loading branch information
ColdWaterLW authored Aug 22, 2024
2 parents 61a642d + 54ffaaf commit 9c722bb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sqle/server/auditplan/job_task_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ func SetSQLPriority(sqlList []*model.SQLManageRecord) ([]*model.SQLManageRecord,
return nil, err
}
highPriorityConditions := auditPlan.HighPriorityParams
priority := sql.NullString{}
for _, highPriorityCondition := range highPriorityConditions {
var compareParamVale string
// 审核级别特殊处理
Expand All @@ -189,12 +190,13 @@ func SetSQLPriority(sqlList []*model.SQLManageRecord) ([]*model.SQLManageRecord,
compareParamVale = fmt.Sprintf("%v", infoV)
}
if high, err := highPriorityConditions.CompareParamValue(highPriorityCondition.Key, compareParamVale); err == nil && high {
sqlList[i].Priority = sql.NullString{
priority = sql.NullString{
String: model.PriorityHigh,
Valid: true,
}
}
}
sqlList[i].Priority = priority
}
return sqlList, nil
}

0 comments on commit 9c722bb

Please sign in to comment.