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:
Graham McIntire 2025-07-27 10:33:45 -05:00
parent 46f68f3070
commit 028dd50372
No known key found for this signature in database

View file

@ -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],