Current section

Files

Jump to
scenic_new templates new_example lib pubsub supervisor.ex.eex
Raw

templates/new_example/lib/pubsub/supervisor.ex.eex

# a simple supervisor that starts up the Scenic.SensorPubSub server
# and any set of other sensor processes
defmodule <%= @mod %>.PubSub.Supervisor do
use Supervisor
def start_link(_) do
Supervisor.start_link(__MODULE__, :ok)
end
def init(:ok) do
[
# add your data publishers here
<%= @mod %>.PubSub.Temperature
]
|> Supervisor.init(strategy: :one_for_one)
end
end