databus.go 416 B

12345678910111213141516171819
  1. package dao
  2. import (
  3. "context"
  4. "go-common/app/interface/main/dm/model"
  5. "go-common/library/log"
  6. )
  7. // SendAction send action to job.
  8. func (d *Dao) SendAction(c context.Context, k string, act *model.ReportAction) (err error) {
  9. if err = d.databus.Send(c, k, act); err != nil {
  10. log.Error("actionPub.Send(data:%v) error(%v)", act, err)
  11. } else {
  12. log.Info("actionPub.Send(action:%v) success", act)
  13. }
  14. return
  15. }