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
# Extract database from path if present
redis_database = case redis_uri.path do
nil -> 0
"/" -> 0
path ->
path |> String.trim_leading("/") |> String.to_integer()
redis_database = try do
case redis_uri.path do
nil -> 0
"/" -> 0
path ->
path |> String.trim_leading("/") |> String.to_integer()
end
rescue
_ -> 0
end