runs
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
%%% @doc
|
||||
%%% front end web development lab Client Service Supervisor
|
||||
%%%
|
||||
%%% This is the service-level supervisor of the system. It is the parent of both the
|
||||
%%% client connection handlers and the client manager (which manages the client
|
||||
%%% connection handlers). This is the child of fd_sup.
|
||||
%%%
|
||||
%%% See: http://erlang.org/doc/apps/kernel/application.html
|
||||
%%% @end
|
||||
|
||||
-module(fd_httpd_clients).
|
||||
-vsn("0.1.0").
|
||||
-behavior(supervisor).
|
||||
-author("Peter Harpending <peterharpending@qpq.swiss>").
|
||||
-copyright("Peter Harpending <peterharpending@qpq.swiss>").
|
||||
-license("BSD-2-Clause-FreeBSD").
|
||||
|
||||
-export([start_link/0]).
|
||||
-export([init/1]).
|
||||
|
||||
|
||||
-spec start_link() -> {ok, pid()}.
|
||||
%% @private
|
||||
%% This supervisor's own start function.
|
||||
|
||||
start_link() ->
|
||||
supervisor:start_link({local, ?MODULE}, ?MODULE, none).
|
||||
|
||||
-spec init(none) -> {ok, {supervisor:sup_flags(), [supervisor:child_spec()]}}.
|
||||
%% @private
|
||||
%% The OTP init/1 function.
|
||||
|
||||
init(none) ->
|
||||
RestartStrategy = {rest_for_one, 1, 60},
|
||||
HttpClientMan = {fd_httpd_client_man,
|
||||
{fd_httpd_client_man, start_link, []},
|
||||
permanent,
|
||||
5000,
|
||||
worker,
|
||||
[fd_httpd_client_man]},
|
||||
HttpClientSup = {fd_httpd_client_sup,
|
||||
{fd_httpd_client_sup, start_link, []},
|
||||
permanent,
|
||||
5000,
|
||||
supervisor,
|
||||
[fd_httpd_client_sup]},
|
||||
Children = [HttpClientSup, HttpClientMan],
|
||||
{ok, {RestartStrategy, Children}}.
|
||||
Reference in New Issue
Block a user