Skip to content

Commit dccf3b7

Browse files
committed
Use child_spec (Supervisor.Spec deprecation)
1 parent ea77f2f commit dccf3b7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/ex_health.ex

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,15 @@ defmodule ExHealth do
8989
end
9090

9191
def start(_type, args) do
92-
import Supervisor.Spec
93-
9492
configure(args)
9593

9694
initial_state = load_config()
9795

9896
children = [
99-
supervisor(ExHealth.HealthServer, [initial_state])
97+
%{
98+
id: ExHealth.HealthServer,
99+
start: {ExHealth.HealthServer, :start_link, [initial_state]}
100+
}
100101
]
101102

102103
opts = [strategy: :one_for_one, name: ExHealth.Supervisor]

0 commit comments

Comments
 (0)