%% =================================================================== %% EventHub – инфраструктурный супервизор (с archive_manager) %% =================================================================== -module(infra_sup). -behaviour(supervisor). -export([start_link/0]). -export([init/1]). start_link() -> supervisor:start_link({local, ?MODULE}, ?MODULE, []). init([]) -> SupFlags = #{strategy => one_for_one, intensity => 5, period => 10}, Children = [ #{id => infra_mnesia, start => {infra_mnesia, start_link, []}, restart => permanent, shutdown => 5000, type => worker, modules => [infra_mnesia]}, #{id => stats_collector, start => {stats_collector, start_link, []}, restart => permanent, shutdown => 5000, type => worker, modules => [stats_collector]}, #{id => archive_manager, start => {archive_manager, start_link, []}, restart => permanent, shutdown => 5000, type => worker, modules => [archive_manager]}, #{id => migration_engine, start => {migration_engine, start_link, []}, restart => permanent, shutdown => 5000, type => worker, modules => [migration_engine]} ], {ok, {SupFlags, Children}}.