Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- defmodule MyApp.Application do
- use Application
- import Supervisor.Spec
- def start(_type, _args) do
- children_sv1 = [
- supervisor(MyApp.Repo, []),
- ... # other workers
- ]
- children_sv2 = [
- supervisor(MyApp.Endpoint, []),
- ... # other workers
- ]
- opts1 = [strategy: :one_for_one, name: MyApp.Supervisor1]
- opts2 = [strategy: :one_for_one, name: MyApp.Supervisor2]
- Supervisor.start_link(children_sv1, opts)
- Supervisor.start_link(children_sv2, opts)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement