fix
This commit is contained in:
parent
386650df9b
commit
63d5603008
4
rules.go
4
rules.go
@ -38,14 +38,14 @@ func resetMsgParsingRules2() error {
|
|||||||
|
|
||||||
stmt, err := db.Prepare(`INSERT INTO msg_rules (prio, msg_type_id, descn, rule)
|
stmt, err := db.Prepare(`INSERT INTO msg_rules (prio, msg_type_id, descn, rule)
|
||||||
VALUES (?, ?, ?, ?);`)
|
VALUES (?, ?, ?, ?);`)
|
||||||
logOnError(errm "resetMsgParsingRules2 : prepare statement")
|
logOnError(err, "resetMsgParsingRules2 : prepare statement")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
defer stmt.Close()
|
defer stmt.Close()
|
||||||
for r := range rules {
|
for r := range rules {
|
||||||
_, err = stmt.Exec(r.Priority, r.MsgTypeID64, r.Description, r.Rule)
|
_, err = stmt.Exec(r.Priority, r.MsgTypeID64, r.Description, r.Rule)
|
||||||
logOnError(err, "resetMsgParsingRules2 : insert statement " + r.Description)
|
logOnError(err, "resetMsgParsingRules2 : insert statement "+r.Description)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user