Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
liaosunny123 committed Aug 29, 2023
1 parent 1152ade commit 9b43d9d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
18 changes: 18 additions & 0 deletions src/services/event/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,12 @@ func Consume(ch *amqp.Channel, queueName string) {
}).Infof("Event dealt with type 1")
span.End()
err = d.Ack(false)
if err != nil {
logger.WithFields(logrus.Fields{
"err": err,
}).Errorf("Error when ack")
logging.SetSpanError(span, err)
}
case 2:
var types string
switch raw.Source {
Expand Down Expand Up @@ -176,6 +182,12 @@ func Consume(ch *amqp.Channel, queueName string) {
}).Infof("Event dealt with type 2")
span.End()
err = d.Ack(false)
if err != nil {
logger.WithFields(logrus.Fields{
"err": err,
}).Errorf("Error when ack")
logging.SetSpanError(span, err)
}
case 3:
var items []gorse.Item
for _, id := range raw.VideoId {
Expand All @@ -202,6 +214,12 @@ func Consume(ch *amqp.Channel, queueName string) {
}).Infof("Event dealt with type 3")
span.End()
err = d.Ack(false)
if err != nil {
logger.WithFields(logrus.Fields{
"err": err,
}).Errorf("Error when ack")
logging.SetSpanError(span, err)
}
}
}
}
2 changes: 1 addition & 1 deletion src/services/recommend/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func (a RecommendServiceImpl) GetRecommendInformation(ctx context.Context, reque
StatusMsg: strings.RecommendServiceInnerError,
VideoList: nil,
}
return nil, err
return resp, err
}

resp = &recommend.RecommendResponse{
Expand Down

0 comments on commit 9b43d9d

Please sign in to comment.