Skip to content

Instantly share code, notes, and snippets.

@myobie
Created June 27, 2017 09:01
Show Gist options
  • Select an option

  • Save myobie/5c29efff51a69b49f5fd701e4af7a820 to your computer and use it in GitHub Desktop.

Select an option

Save myobie/5c29efff51a69b49f5fd701e4af7a820 to your computer and use it in GitHub Desktop.
The example supervisor tree from the highlander project
opts = [host,
[stop_on_disconnect: true, name: :zk]]
children = [
worker(Zookeeper.Client, opts, []),
worker(Registry.Server, [], []),
worker(Registry.NodeCycleServer, [], []),
supervisor(Object.Supervisor, [], [])
]
supervise children, strategy: :rest_for_one
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment