Sha256: f6cc92729f8feedd827d292768b0ad562e9a598b7f76c02d26c5cba1b220e46d
Contents?: true
Size: 935 Bytes
Versions: 49
Compression:
Stored size: 935 Bytes
Contents
% This supervisor is responsible for monitoring the % client service -module (pm_client_supervisor). -behaviour(supervisor). -export([start/0, start_in_shell_for_testing/0, start_link/1, init/1]). -ifdef(EUNIT). -include_lib("eunit/include/eunit.hrl"). -endif. start() -> spawn(fun() -> supervisor:start_link({local, ?MODULE}, ?MODULE, _Arg = []) end). start_in_shell_for_testing() -> {ok, Pid} = supervisor:start_link({local, ?MODULE}, ?MODULE, _Arg = []), unlink(Pid). start_link(Args) -> supervisor:start_link({local, ?MODULE}, ?MODULE, Args). init([]) -> RestartStrategy = one_for_one, MaxRestarts = 1000, MaxTimeBetRestarts = 3600, TimeoutTime = 5000, SupFlags = {RestartStrategy, MaxRestarts, MaxTimeBetRestarts}, % Servers ClientServer = {client_server1, {client_server, start, []}, permanent, TimeoutTime, worker, [client_server]}, LoadServers = [ClientServer], {ok, {SupFlags, LoadServers}}.
Version data entries
49 entries across 49 versions & 3 rubygems