test
This commit is contained in:
parent
511d1364d7
commit
c572bc652e
9
rules.go
9
rules.go
@ -19,10 +19,9 @@ func resetMsgParsingRules2() error {
|
||||
err = json.Unmarshal(b, &rules)
|
||||
|
||||
for k, _ := range rules {
|
||||
// b, err := json.Marshal(r)
|
||||
// log.Printf("Rule : %s\n", string(b))
|
||||
|
||||
r := rules[k]
|
||||
b, err := json.Marshal(r)
|
||||
log.Printf("Rule : %s\n", string(b))
|
||||
|
||||
r.MsgTypeID64, err = codeObjSubTypeId(r.MsgType)
|
||||
logOnError(err, "resetMsgParsingRules2 : codeObjSubTypeId("+r.MsgType+")")
|
||||
@ -51,6 +50,10 @@ func resetMsgParsingRules2() error {
|
||||
}
|
||||
defer stmt.Close()
|
||||
for _, r := range rules {
|
||||
|
||||
b, err := json.Marshal(r)
|
||||
log.Printf("Rule2 : %s\n", string(b))
|
||||
|
||||
_, err = stmt.Exec(r.Priority, r.MsgTypeID64, r.Description, r.Rule)
|
||||
logOnError(err, "resetMsgParsingRules2 : insert statement "+r.Description)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user