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 == "" {