Fix syntax error in runtime.exs Redis configuration

- Wrap String.to_integer in try/rescue block properly
- Fix CompileError caused by rescue clause inside case statement
- Ensures runtime.exs can compile and load Redis configuration

🤖 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:18:32 -05:00
parent de74593d08
commit 46f68f3070
No known key found for this signature in database

View file

@ -135,11 +135,13 @@ if config_env() == :prod do
end end
# Extract database from path if present # Extract database from path if present
redis_database = case redis_uri.path do redis_database = try do
nil -> 0 case redis_uri.path do
"/" -> 0 nil -> 0
path -> "/" -> 0
path |> String.trim_leading("/") |> String.to_integer() path ->
path |> String.trim_leading("/") |> String.to_integer()
end
rescue rescue
_ -> 0 _ -> 0
end end