提交 0fbe4d8e authored 作者: gukai's avatar gukai

优化异步日志

上级 27c47699
package notify package notify
import ( import (
"context"
"fmt" "fmt"
"github.com/nsqio/go-nsq" "github.com/nsqio/go-nsq"
"gitlab.jxhh.com/stbz/library.git/logs" "gitlab.jxhh.com/stbz/library.git/logs"
...@@ -57,7 +56,7 @@ func (p *NsqProducer) Publish(topic string, message string) error { ...@@ -57,7 +56,7 @@ func (p *NsqProducer) Publish(topic string, message string) error {
//发布延迟消息 //发布延迟消息
func (p *NsqProducer) DeferredPublish(topic string,delay time.Duration, message string) error { func (p *NsqProducer) DeferredPublish(topic string,delay time.Duration, message string) error {
logs.Infof(context.Background(),"topic",message) //logs.Infof(context.Background(),"topic",message)
var err error var err error
if p.producer != nil { if p.producer != nil {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论