From 53c8869cb42405282064fc15d9d2e668af303d56 Mon Sep 17 00:00:00 2001 From: Alexander Renz Date: Tue, 31 Dec 2024 11:35:03 +0100 Subject: [PATCH] fix: improve Redis connection handling for thumbnail verification --- cmd/server/main.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cmd/server/main.go b/cmd/server/main.go index f496adb..67c739e 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -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)