debug
This commit is contained in:
parent
6650f650ae
commit
eb954d56a6
5
rules.go
5
rules.go
@ -7,6 +7,7 @@ import (
|
||||
|
||||
func resetMsgParsingRules() error {
|
||||
var rules, rules2 []MessageParsingRule
|
||||
var count int64
|
||||
|
||||
b, err := Asset("data/msg_rules.json")
|
||||
logOnError(err, "resetMsgParsingRules : load data/msg_rules.json")
|
||||
@ -52,6 +53,7 @@ func resetMsgParsingRules() error {
|
||||
return err
|
||||
}
|
||||
defer stmt.Close()
|
||||
count = 0
|
||||
for _, r2 := range rules2 {
|
||||
|
||||
_, err = stmt.Exec(r2.Priority, r2.MsgTypeID64, r2.Description, r2.Rule)
|
||||
@ -59,9 +61,12 @@ func resetMsgParsingRules() error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
count += 1
|
||||
|
||||
}
|
||||
|
||||
fmt.Printf("resetMsgParsingRules : %d rules loaded.\n", count)
|
||||
|
||||
return nil
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user