go-common/app/interface/main/answer/dao/databus.go

18 lines
385 B
Go
Raw Normal View History

2019-04-22 10:49:16 +00:00
package dao
import (
"context"
"strconv"
"go-common/library/log"
)
// PubExtraRet pub extra msg into databus.
func (d *Dao) PubExtraRet(c context.Context, mid int64, msg interface{}) (err error) {
key := strconv.FormatInt(mid, 10)
if err = d.dbExtraAnswerRet.Send(c, key, msg); err != nil {
log.Error("d.dbExtraAnswerRet.Send(%s, %v) error (%v)", key, msg, err)
}
return
}