Fix Redis authentication error - don't send empty password
- Only include password in Exq config if it's not empty - Prevents "ERR AUTH <password>" error when Redis has no authentication - Build config dynamically to exclude empty password field 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
46f68f3070
commit
028dd50372
1 changed files with 11 additions and 2 deletions
|
|
@ -146,11 +146,20 @@ if config_env() == :prod do
|
|||
_ -> 0
|
||||
end
|
||||
|
||||
config :exq,
|
||||
exq_config = [
|
||||
host: redis_host,
|
||||
port: redis_port,
|
||||
password: redis_password,
|
||||
database: redis_database
|
||||
]
|
||||
|
||||
# Only add password if it's not empty
|
||||
exq_config = if redis_password != "" and redis_password != nil do
|
||||
Keyword.put(exq_config, :password, redis_password)
|
||||
else
|
||||
exq_config
|
||||
end
|
||||
|
||||
config :exq, exq_config
|
||||
|
||||
config :aprsme,
|
||||
ecto_repos: [Aprsme.Repo],
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue