test
This commit is contained in:
parent
b37ca8547b
commit
683fbdd84a
9
sql.go
9
sql.go
@ -289,10 +289,17 @@ func loadMsgParsingRules() (map[int]MessageParsingRule, error) {
|
||||
)
|
||||
|
||||
log.Println("Loading message parsing rules...")
|
||||
|
||||
m := make(map[int]MessageParsingRule)
|
||||
count := int(0)
|
||||
|
||||
defer func() {
|
||||
if rec := recover(); rec != nil {
|
||||
log.Printf("loadMsgParsingRules : panic (%s) \n", rec)
|
||||
err := error.New("Can't load message parsing rules.")
|
||||
return m, err
|
||||
}
|
||||
}()
|
||||
|
||||
rules, err := db.Query(`SELECT r.id, r.prio, r.descn, r.rule, r.msg_type_id FROM msg_rules r ORDER BY r.prio DESC;`)
|
||||
if err != nil {
|
||||
return m, err
|
||||
|
Loading…
Reference in New Issue
Block a user