We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7cddf9d commit e0eb900Copy full SHA for e0eb900
1 file changed
lib/mongo_ecto/connection.ex
@@ -13,18 +13,13 @@ defmodule Mongo.Ecto.Connection do
13
def storage_down(opts) do
14
opts = Keyword.put(opts, :pool, DBConnection.Connection)
15
16
- {:ok, pid} = case Application.ensure_started(:mongodb) do
17
- :ok -> {:ok, nil}
18
- {:error, reason} -> Mongo.App.start(nil, nil)
19
- pid -> pid
20
- end
+ {:ok, _apps} = Application.ensure_all_started(:mongodb)
21
{:ok, conn} = Mongo.start_link(opts)
22
23
try do
24
Mongo.command!(conn, dropDatabase: 1)
25
:ok
26
after
27
- if pid, do: Supervisor.stop(pid)
28
GenServer.stop(conn)
29
end
30
0 commit comments