Skip to content

Commit

Permalink
fix: improve Redis connection handling for thumbnail verification
Browse files Browse the repository at this point in the history
  • Loading branch information
PlusOne committed Dec 31, 2024
1 parent a613196 commit 53c8869
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions cmd/server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -557,8 +557,13 @@ func main() {
}
}

if conf.Redis.RedisEnabled {
initRedis()
initRedis()

if conf.Redis.RedisEnabled && redisConnected {
log.Info("Redis is enabled and connected. Thumbnail verification will be performed.")
scheduleThumbnailGeneration(ctx)
} else if conf.Redis.RedisEnabled && !redisConnected {
log.Warn("Redis is enabled but connection failed. Thumbnail verification will be skipped.")
}

initializeUploadWorkerPool(ctx, &conf.Workers)
Expand Down

0 comments on commit 53c8869

Please sign in to comment.