Skip to content

Commit 95cfac4

Browse files
committed
fixed accidentally removed child_spec
1 parent bf6e8be commit 95cfac4

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

lib/mongo.ex

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,11 @@ defmodule Mongo do
143143
|> Topology.start_link()
144144
end
145145

146+
def child_spec(opts) do
147+
%{id: Mongo,
148+
start: {Mongo, :start_link, [opts]}}
149+
end
150+
146151
@doc """
147152
Generates a new `BSON.ObjectId`.
148153
"""

lib/mongo/app.ex

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
defmodule Mongo.App do
22
@moduledoc false
33

4+
use Application
5+
46
def start(_type, _args) do
5-
import Supervisor.Spec, warn: false
67

78
children = [
89
{Mongo.IdServer, []},
910
{Mongo.PBKDF2Cache, []},
10-
supervisor(Registry, [:duplicate, :events_registry])
11+
%{
12+
id: Registry,
13+
start: {Registry, :start_link, [:duplicate, :events_registry]},
14+
type: :supervisor
15+
}
1116
]
1217

1318
opts = [strategy: :one_for_one, name: Mongo.Supervisor]

0 commit comments

Comments
 (0)