-module(myapp_sup). -behaviour(supervisor). -export([start_link/0, init/1]). start_link() -> supervisor:start_link({local, ?MODULE}, ?MODULE, []). init(_Args) -> ets:new(events_table, [set, named_table, { keypos, 1 }, public, {write_concurrency, true}]), Procs = [ #{id => worker_1, start => {myapp_events, start_link, []}, restart => permanent, type => worker, modules => [myapp_events]}, #{id => worker_2, start => {myapp_events2, start_link, []}, restart => permanent, type => worker, modules => [myapp_events2]} ], {ok, { #{strategy => one_for_one, intensity => 10, period => 100}, Procs}}.