Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return nil clients if no redis URL is passed. #299

Merged
merged 2 commits into from
Apr 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Version 11.9.7
--------------
* Do not use redis clients when no URL is provided.

Version 11.9.6
--------------
* Refactor of redis client initialisation so it's easier to add new
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
11.9.6
11.9.7
4 changes: 4 additions & 0 deletions mettle/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,10 @@ func one() error {
}

func (r RedisOpts) Clients() (primary, read *redis.Client) {
if r.URL == "" {
return nil, nil
}

password := r.ReadPassword()
tlsConfig := r.ReadTLSConfig()

Expand Down
Loading