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

18 lines
377 B
Go
Raw Normal View History

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