From 028dd5037249da30bf0d157133b4f6d3eeac1277 Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Sun, 27 Jul 2025 10:33:45 -0500 Subject: [PATCH] Fix Redis authentication error - don't send empty password MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Only include password in Exq config if it's not empty - Prevents "ERR AUTH " 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 --- config/runtime.exs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/config/runtime.exs b/config/runtime.exs index 29b82a3..5116182 100644 --- a/config/runtime.exs +++ b/config/runtime.exs @@ -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],