Skip to content

Commit

Permalink
Update redis UniversalClient (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
anhnmt authored May 23, 2023
1 parent 2435b41 commit d5760b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion redislock.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ var (

// NewRedisLocker provides an implementation of the Locker interface using
// redis for storage.
func NewRedisLocker(r *redis.Client, options ...redsync.Option) (gocron.Locker, error) {
func NewRedisLocker(r redis.UniversalClient, options ...redsync.Option) (gocron.Locker, error) {
if err := r.Ping(context.Background()).Err(); err != nil {
return nil, fmt.Errorf("%s: %w", gocron.ErrFailedToConnectToRedis, err)
}
Expand Down

0 comments on commit d5760b6

Please sign in to comment.