ybed_sup.erl 349 B

123456789101112131415
  1. -module(ybed_sup).
  2. -behaviour(supervisor).
  3. -export([start_link/0]).
  4. -export([init/1]).
  5. start_link() -> supervisor:start_link({local, ?MODULE}, ?MODULE, []).
  6. init(_) ->
  7. RestartStrategy = {one_for_all, 0, 1},
  8. Children = [
  9. {ybed, {ybed, start_link, []}, permanent, 5000, worker, [ybed]}
  10. ],
  11. {ok, {RestartStrategy, Children}}.