Skip to content

Commit

Permalink
fix(api): cache Publish error logs (#4150)
Browse files Browse the repository at this point in the history
  • Loading branch information
fsamin authored and yesnault committed Apr 3, 2019
1 parent 85f5218 commit 26ee422
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions engine/api/cache/redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,13 +290,13 @@ func (s *RedisStore) Publish(channel string, value interface{}) {

msg, err := json.Marshal(value)
if err != nil {
log.Warning("redis.Publish> Marshall error, cannot push in channel %s: %v, %s", channel, value, err)
log.Warning("redis.Publish> Marshall error, cannot push in channel %s: %v", channel, err)
return
}

iUnquoted, err := strconv.Unquote(string(msg))
if err != nil {
log.Warning("redis.Publish> Unquote error, cannot push in channel %s: %v, %s", channel, string(msg), err)
log.Warning("redis.Publish> Unquote error, cannot push in channel %s: %v", channel, err)
return
}

Expand All @@ -305,7 +305,7 @@ func (s *RedisStore) Publish(channel string, value interface{}) {
if errP == nil {
break
}
log.Warning("redis.Publish> Unable to publish in channel %s the message %v: %v", channel, value, errP)
log.Warning("redis.Publish> Unable to publish in channel %s: %v", channel, errP)
time.Sleep(100 * time.Millisecond)
}
}
Expand Down

0 comments on commit 26ee422

Please sign in to comment.