-
Notifications
You must be signed in to change notification settings - Fork 2
/
supervisor.ex
45 lines (37 loc) · 1.09 KB
/
supervisor.ex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
defmodule RefInspector.Supervisor do
@moduledoc """
This supervisor module takes care of starting the required database storage
processes. It is automatically started with the `:ref_inspector` application.
If you do not want to automatically start the application itself you can
adapt your configuration for a more manual supervision approach.
Instead of adding `:ref_inspector` to your `:applications` list or using
the automatic discovery you need to add it to your `:included_applications`:
def application do
[
included_applications: [
# ...
:ref_inspector,
# ...
]
]
end
That done you can add `RefInspector.Supervisor` to your hierarchy:
children = [
# ...
RefInspector.Supervisor,
# ..
]
"""
use Supervisor
@doc false
def start_link(default \\ nil) do
Supervisor.start_link(__MODULE__, default, name: __MODULE__)
end
@doc false
def init(_state) do
Supervisor.init(
[RefInspector.Database],
strategy: :one_for_one
)
end
end