Current section

Files

Jump to
persistent_settings lib settings supervisor.ex
Raw

lib/settings/supervisor.ex

defmodule Settings.Supervisor do
@moduledoc false
use Supervisor
def start_link(args \\ []) do
Supervisor.start_link(__MODULE__, args, name: __MODULE__)
end
def init(modules) do
# List all child processes to be supervised
children = [
# Starts a worker by calling: CameraControl.Worker.start_link(arg)
{Settings.Server, modules},
]
# See https://hexdocs.pm/elixir/Supervisor.html
# for other strategies and supported options
opts = [strategy: :one_for_one]
Supervisor.init(children, opts)
end
end