Sha256: 430ac193509caf8734b5b5b184190c79ede2a09b0c2d1498c1de6d29fb4a6d31

Contents?: true

Size: 874 Bytes

Versions: 9

Compression:

Stored size: 874 Bytes

Contents

% This supervisor is responsible for monitoring the 
% client service

-module (pm_node_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 = 3, % 1000
	MaxTimeBetRestarts = 30, % 3600

	SupFlags = {RestartStrategy, MaxRestarts, MaxTimeBetRestarts},

	LoadServers = [
		{pm_node1,
			{pm_node, start_link, []}, 
			permanent, 5000, worker, 
			[pm_node]
		}
	],

	{ok, {SupFlags, LoadServers}}.

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
auser-poolparty-0.2.16 lib/erlang/messenger/src/pm_node_supervisor.erl
auser-poolparty-0.2.20 lib/erlang/messenger/src/pm_node_supervisor.erl
auser-poolparty-0.2.21 lib/erlang/messenger/src/pm_node_supervisor.erl
auser-poolparty-0.2.22 lib/erlang/messenger/src/pm_node_supervisor.erl
auser-poolparty-0.2.23 lib/erlang/messenger/src/pm_node_supervisor.erl
auser-poolparty-0.2.24 lib/erlang/messenger/src/pm_node_supervisor.erl
auser-poolparty-0.2.25 lib/erlang/messenger/src/pm_node_supervisor.erl
auser-poolparty-0.2.26 lib/erlang/messenger/src/pm_node_supervisor.erl
poolparty-0.2.18 lib/erlang/messenger/src/pm_node_supervisor.erl