Created
March 20, 2019 15:34
-
-
Save cybrox/249716d5c8e0141ab3577a909712c8ac to your computer and use it in GitHub Desktop.
phx-ete4.ex
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
defp checkout_shared_db_conn do | |
:ok = Ecto.Adapters.SQL.Sandbox.checkout(Repo, ownership_timeout: :infinity) | |
:ok = Ecto.Adapters.SQL.Sandbox.mode(Repo, {:shared, self()}) | |
end | |
defp checkin_shared_db_conn(_) do | |
:ok = Ecto.Adapters.SQL.Sandbox.checkin(Repo) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment