邮件RPC 通知

This commit is contained in:
meixiongfeng 2023-10-09 17:25:00 +08:00
parent f878aed122
commit bc5251473a
2 changed files with 3 additions and 3 deletions

View File

@ -140,7 +140,7 @@ func (this *Mail) Reddot(session comm.IUserSession, rid ...comm.ReddotType) (red
return return
} }
func (this *Mail) Rpc_Mail(ctx context.Context, args *pb.DBMailData) (err error) { func (this *Mail) Rpc_Mail(ctx context.Context, args *pb.DBMailData, reply *pb.EmptyResp) (err error) {
this.Debug("Rpc_Mail", log.Field{Key: "args", Value: args.String()}) this.Debug("Rpc_Mail", log.Field{Key: "args", Value: args.String()})
var ( var (
conn *db.DBConn conn *db.DBConn

View File

@ -73,9 +73,9 @@ func (this *Api_Comp) CreateMail(c *engine.Context) {
if len(req.Items) > 0 { if len(req.Items) > 0 {
mail.Reward = true mail.Reward = true
} }
ctr, _ := context.WithTimeout(context.Background(), time.Second*5)
if _, err = this.module.service.RpcGo( if _, err = this.module.service.RpcGo(
context.Background(), ctr,
comm.Service_Worker, comm.Service_Worker,
string(comm.Rpc_Mail), string(comm.Rpc_Mail),
mail, nil); err != nil { mail, nil); err != nil {