File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ defmodule Srh.Redis.ClientWorker do
3131 { :ok , res } ->
3232 { :reply , { :ok , res } , state }
3333
34+ # Both connection errors and Redis command errors will be handled here
3435 { :error , res } ->
3536 { :reply , { :error , res } , state }
3637 end
@@ -61,7 +62,8 @@ defmodule Srh.Redis.ClientWorker do
6162 } = state
6263 )
6364 when is_binary ( connection_string ) do
64- # Will cause a crash for this genserver if the connection fails
65+ # NOTE: Redix only seems to open the connection when the first command is sent
66+ # This means that this will return :ok even if the connection string may not actually be connectable
6567 { :ok , pid } = Redix . start_link ( connection_string )
6668 { :noreply , % { state | redix_pid: pid } }
6769 end
You can’t perform that action at this time.
0 commit comments