mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-17 13:24:56 +00:00
log error saving post in sentiment service
This commit is contained in:
@@ -29,7 +29,7 @@ func EnrichPost(ctx context.Context, post *pb.Post) error {
|
|||||||
logger.Infof("Setting score %.1f for post '%v'", score, post.Title)
|
logger.Infof("Setting score %.1f for post '%v'", score, post.Title)
|
||||||
|
|
||||||
// now save the post
|
// now save the post
|
||||||
PostsClient.Save(ctx, &pb.SaveRequest{
|
_, err := PostsClient.Save(ctx, &pb.SaveRequest{
|
||||||
Id: post.Id,
|
Id: post.Id,
|
||||||
Title: post.Title,
|
Title: post.Title,
|
||||||
Content: post.Content,
|
Content: post.Content,
|
||||||
@@ -39,6 +39,9 @@ func EnrichPost(ctx context.Context, post *pb.Post) error {
|
|||||||
Image: post.Image,
|
Image: post.Image,
|
||||||
Slug: post.Slug,
|
Slug: post.Slug,
|
||||||
})
|
})
|
||||||
|
if err != nil {
|
||||||
|
logger.Info("Error saving post: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user