aboutsummaryrefslogtreecommitdiff
path: root/lib/exping/supervisor.ex
blob: faf6ccb3a3c4e31aa1242cee7bb9d7d9527d4aca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
defmodule ExPing.Supervisor do
  use Supervisor

  @moduledoc """
  ExPing Supervision Tree
  """

  @spec start_link :: {:ok, pid} | {:error, any}
  def start_link do
    Supervisor.start_link(__MODULE__, [])
  end

  @spec init(any) :: no_return
  def init(_) do
    children = [
      supervisor(Task.Supervisor, [[name: ExPing.Supervisor.Task]])
    ]

    supervise(children, strategy: :one_for_one, name: __MODULE__)
  end
end