notify.go 442 B

123456789101112131415161718
  1. package service
  2. import (
  3. "context"
  4. "strconv"
  5. "go-common/app/job/main/block/model"
  6. "github.com/pkg/errors"
  7. )
  8. func (s *Service) accountNotify(c context.Context, mid int64) (err error) {
  9. msg := &model.AccountNotify{UID: mid, Action: "blockUser"}
  10. if err = s.accountNotifyPub.Send(c, strconv.FormatInt(msg.UID, 10), msg); err != nil {
  11. err = errors.Errorf("mid(%d) s.accountNotify.Send(%+v) error(%+v)", msg.UID, msg, err)
  12. }
  13. return
  14. }