Created
August 3, 2017 03:40
-
-
Save adkron/d1b180189c94ccbc0c3e574c3d6a873f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Zipato.Sessions.Supervisor do | |
@moduledoc """ | |
Supervisor for all sessions | |
""" | |
use Supervisor | |
def start_link do | |
Supervisor.start_link(__MODULE__, :ok, name: __MODULE__) | |
end | |
def init(:ok) do | |
children = [ | |
worker(Zipato.Sessions.Master, [], function: :new), | |
supervisor(Zipato.Sessions.HubsSupervisor, []) | |
] | |
opts = [strategy: :one_for_one] | |
supervise(children, opts) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment