From ac000112c3c1ccbcf0f45389f9cdbef7fe03b233 Mon Sep 17 00:00:00 2001 From: Ryan D McGuire Date: Thu, 3 Apr 2025 16:00:57 -0400 Subject: [PATCH] implement redis key ttl --- pkg/weather/recorder/recorders/redis/redis.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/weather/recorder/recorders/redis/redis.go b/pkg/weather/recorder/recorders/redis/redis.go index cd46978..6122b5d 100644 --- a/pkg/weather/recorder/recorders/redis/redis.go +++ b/pkg/weather/recorder/recorders/redis/redis.go @@ -45,6 +45,7 @@ func (r *RedisRecorder) Ping(ctx context.Context) error { } func (r *RedisRecorder) Init(ctx context.Context, opts *recorders.RecorderOpts) { + r.baseCtx = opts.BaseCtx r.log = zerolog.Ctx(r.baseCtx) if opts.AppConfig.RecorderConfig.RedisConfig == nil { @@ -58,7 +59,6 @@ func (r *RedisRecorder) Init(ctx context.Context, opts *recorders.RecorderOpts) r.config = opts.AppConfig r.keep = opts.RetainLast r.RWMutex = &sync.RWMutex{} - r.baseCtx = opts.BaseCtx keyTTL := opts.AppConfig.RecorderConfig.RedisConfig.RedisKeyTTL if keyTTL == "" {