Skip to content

Instantly share code, notes, and snippets.

@tylerflint
Created October 7, 2011 15:37
Show Gist options
  • Save tylerflint/1270560 to your computer and use it in GitHub Desktop.
Save tylerflint/1270560 to your computer and use it in GitHub Desktop.
baker_http_supervisor
-module(baker_http_supervisor).
-include("baker.hrl").
-export([start_link/0]).
start_link() ->
WorkerCount =
case os:getenv("HTTP_LISTENER_COUNT") of
false -> ?DEFAULT_HTTP_LISTENER_COUNT;
CountMatch -> CountMatch
end,
lists:foreach(fun(_)->
supervisor:start_child(baker_ip_sup,[])
end, lists:seq(1, WorkerCount)),
{ok, self()}.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment