Created
March 1, 2018 22:57
-
-
Save alvesl/c8d856b0da3d8842e3c952ff66ef8e21 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 MyApp.Supervisor do | |
use Supervisor | |
def start_link do | |
Supervisor.start_link(__MODULE__, :ok, name: __MODULE__) | |
end | |
def init(:ok) do | |
children = [ | |
worker(Registry, [[name: Registry.MyApp, keys: :unique]]), | |
worker(MyApp.Manager, []) | |
] | |
supervise(children, strategy: :one_for_one) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment