Skip to content

Instantly share code, notes, and snippets.

@jakowicz
Created June 27, 2017 14:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jakowicz/7c46bfcdd16216322d844f63183b8a61 to your computer and use it in GitHub Desktop.
Save jakowicz/7c46bfcdd16216322d844f63183b8a61 to your computer and use it in GitHub Desktop.
defmodule Redis do
def get_conn do
{_, redis} = Redix.start_link host: Application.get_env(:auth, :redis_host),
port: Application.get_env(:auth, :redis_port)
redis
end
def kill_conn(redis_conn) do
redis_conn |> Redix.stop
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment