Created
November 4, 2018 09:10
-
-
Save KamilLelonek/baba06a35893a7d44e8c18bf42bba76c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Benchmarks.Util.Connection do | |
alias EventStore.{Config, Storage.Initializer} | |
def init! do | |
with {:ok, conn} = | |
Config.parsed() | |
|> Config.default_postgrex_opts() | |
|> Postgrex.start_link() do | |
conn | |
end | |
end | |
def reset!(conn), | |
do: Initializer.reset!(conn) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment