feat(assist): correct 'empty list error' handler
This commit is contained in:
parent
33e2e8efb9
commit
e0cd1994fd
1 changed files with 5 additions and 1 deletions
|
|
@ -75,7 +75,11 @@ func (as *assistStatsImpl) loadData() {
|
|||
|
||||
events, err := as.redisClient.LPopCount(ctx, "assist:stats", 1000).Result()
|
||||
if err != nil {
|
||||
as.log.Error(ctx, "Failed to load data from redis: ", err)
|
||||
if errors.Is(err, redis.Nil) {
|
||||
as.log.Debug(ctx, "No data to load from redis")
|
||||
} else {
|
||||
as.log.Error(ctx, "Failed to load data from redis: ", err)
|
||||
}
|
||||
return
|
||||
}
|
||||
if len(events) == 0 {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue