implement redis key ttl
All checks were successful
Build and Publish / check-chart (push) Successful in 12s
Build and Publish / helm-release (push) Has been skipped
Build and Publish / release (push) Successful in 3m33s

This commit is contained in:
Ryan McGuire 2025-04-03 16:00:57 -04:00
parent 21a4165489
commit ac000112c3

View File

@ -45,6 +45,7 @@ func (r *RedisRecorder) Ping(ctx context.Context) error {
} }
func (r *RedisRecorder) Init(ctx context.Context, opts *recorders.RecorderOpts) { func (r *RedisRecorder) Init(ctx context.Context, opts *recorders.RecorderOpts) {
r.baseCtx = opts.BaseCtx
r.log = zerolog.Ctx(r.baseCtx) r.log = zerolog.Ctx(r.baseCtx)
if opts.AppConfig.RecorderConfig.RedisConfig == nil { 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.config = opts.AppConfig
r.keep = opts.RetainLast r.keep = opts.RetainLast
r.RWMutex = &sync.RWMutex{} r.RWMutex = &sync.RWMutex{}
r.baseCtx = opts.BaseCtx
keyTTL := opts.AppConfig.RecorderConfig.RedisConfig.RedisKeyTTL keyTTL := opts.AppConfig.RecorderConfig.RedisConfig.RedisKeyTTL
if keyTTL == "" { if keyTTL == "" {