Skip to content

Instantly share code, notes, and snippets.

@adkron
Created August 3, 2017 03:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adkron/d1b180189c94ccbc0c3e574c3d6a873f to your computer and use it in GitHub Desktop.
Save adkron/d1b180189c94ccbc0c3e574c3d6a873f to your computer and use it in GitHub Desktop.
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