提交 72a333fa 编写于 作者: U Ulric Qin

fix typo

上级 9cd97e4f
......@@ -79,7 +79,7 @@ func NodeQueryPath(query string, limit int) (nodes []Node, err error) {
func TreeSearchByPath(query string) (nodes []Node, err error) {
session := DB["mon"].NewSession()
defer session.Clone()
defer session.Close()
if strings.Contains(query, " ") {
arr := strings.Fields(query)
......
......@@ -20,7 +20,7 @@ type Team struct {
func (t *Team) Del() error {
session := DB["uic"].NewSession()
defer session.Clone()
defer session.Close()
if err := session.Begin(); err != nil {
return err
......
......@@ -18,9 +18,9 @@ func init() {
}
func Update() error {
strategys := stra.GetLogCollects()
strategies := stra.GetLogCollects()
err := UpdateGlobalStrategy(strategys)
err := UpdateGlobalStrategy(strategies)
if err != nil {
logger.Errorf("Update Strategy cache error ! [msg:%v]", err)
return err
......
......@@ -146,8 +146,8 @@ func DeepCopyStringMap(p map[string]string) map[string]string {
const PATTERN_EXCLUDE_PARTITION = "```EXCLUDE```"
func parsePattern(strategys []*Strategy) {
for _, st := range strategys {
func parsePattern(strategies []*Strategy) {
for _, st := range strategies {
patList := strings.Split(st.Pattern, PATTERN_EXCLUDE_PARTITION)
if len(patList) == 1 {
......@@ -163,8 +163,8 @@ func parsePattern(strategys []*Strategy) {
}
}
func updateRegs(strategys []*Strategy) {
for _, st := range strategys {
func updateRegs(strategies []*Strategy) {
for _, st := range strategies {
st.TagRegs = make(map[string]*regexp.Regexp, 0)
st.ParseSucc = false
......
......@@ -20,6 +20,6 @@ func loopDetect() {
func detect() {
ps := stra.GetProcCollects()
DelNoPorcCollect(ps)
AddNewPorcCollect(ps)
DelNoProcCollect(ps)
AddNewProcCollect(ps)
}
......@@ -9,7 +9,7 @@ var (
ProcsWithScheduler = make(map[string]*ProcScheduler)
)
func DelNoPorcCollect(newCollect map[string]*model.ProcCollect) {
func DelNoProcCollect(newCollect map[string]*model.ProcCollect) {
for currKey, currProc := range Procs {
newProc, ok := newCollect[currKey]
if !ok || currProc.LastUpdated != newProc.LastUpdated {
......@@ -18,7 +18,7 @@ func DelNoPorcCollect(newCollect map[string]*model.ProcCollect) {
}
}
func AddNewPorcCollect(newCollect map[string]*model.ProcCollect) {
func AddNewProcCollect(newCollect map[string]*model.ProcCollect) {
for target, newProc := range newCollect {
if _, ok := Procs[target]; ok && newProc.LastUpdated == Procs[target].LastUpdated {
continue
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册