6c0775ee5e
Periodically prune old read notifications, revoked/expired auth sessions, and admin_audit in chunked transactions; wire under eventhub config.
68 lines
2.0 KiB
Erlang
Executable File
68 lines
2.0 KiB
Erlang
Executable File
%% ===================================================================
|
|
%% 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 => pg,
|
|
start => {pg, start_link, []},
|
|
restart => permanent,
|
|
type => worker},
|
|
#{id => pg_global,
|
|
start => {pg, start_link, [global]},
|
|
restart => permanent,
|
|
type => worker},
|
|
#{id => stats_collector,
|
|
start => {stats_collector, start_link, []},
|
|
restart => permanent,
|
|
shutdown => 5000,
|
|
type => worker,
|
|
modules => [stats_collector]},
|
|
#{id => node_monitor,
|
|
start => {node_monitor, start_link, []},
|
|
restart => permanent,
|
|
type => worker},
|
|
#{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]},
|
|
#{id => subscription_worker,
|
|
start => {subscription_worker, start_link, []},
|
|
restart => permanent,
|
|
shutdown => 5000,
|
|
type => worker,
|
|
modules => [subscription_worker]},
|
|
#{id => infra_cleanup,
|
|
start => {infra_cleanup, start_link, []},
|
|
restart => permanent,
|
|
shutdown => 5000,
|
|
type => worker,
|
|
modules => [infra_cleanup]}
|
|
],
|
|
{ok, {SupFlags, Children}}.
|