|
@ -78,36 +78,8 @@ handle_call({mSetHighWater, N}, #state{shaper = Shaper} = State) -> |
|
|
handle_call(_Request, State) -> |
|
|
handle_call(_Request, State) -> |
|
|
{ok, unknown_call, State}. |
|
|
{ok, unknown_call, State}. |
|
|
|
|
|
|
|
|
shaperFun() -> |
|
|
|
|
|
SupSS = lgUtil:get_env(suppressSupStartStop, false), |
|
|
|
|
|
AppSS = lgUtil:get_env(suppressAppStartStop, false), |
|
|
|
|
|
if |
|
|
|
|
|
SupSS andalso AppSS -> |
|
|
|
|
|
fun suppress_supervisor_start_and_application_start/1; |
|
|
|
|
|
SupSS -> |
|
|
|
|
|
fun suppress_supervisor_start/1; |
|
|
|
|
|
AppSS -> |
|
|
|
|
|
fun suppress_application_start/1; |
|
|
|
|
|
true -> |
|
|
|
|
|
fun(_) -> false end |
|
|
|
|
|
end. |
|
|
|
|
|
|
|
|
|
|
|
suppress_supervisor_start_and_application_start(E) -> |
|
|
|
|
|
suppress_supervisor_start(E) orelse suppress_application_start(E). |
|
|
|
|
|
|
|
|
|
|
|
suppress_application_start({info_report, _GL, {_Pid, std_info, D}}) when is_list(D) -> |
|
|
|
|
|
lists:member({exited, stopped}, D); |
|
|
|
|
|
suppress_application_start({info_report, _GL, {_P, progress, D}}) -> |
|
|
|
|
|
lists:keymember(application, 1, D) andalso lists:keymember(started_at, 1, D); |
|
|
|
|
|
suppress_application_start(_) -> |
|
|
|
|
|
false. |
|
|
|
|
|
|
|
|
|
|
|
suppress_supervisor_start({info_report, _GL, {_P, progress, D}}) -> |
|
|
|
|
|
lists:keymember(started, 1, D) andalso lists:keymember(supervisor, 1, D); |
|
|
|
|
|
suppress_supervisor_start(_) -> |
|
|
|
|
|
false. |
|
|
|
|
|
|
|
|
|
|
|
handle_event(Event, #state{sink = Sink, shaper = Shaper} = State) -> |
|
|
handle_event(Event, #state{sink = Sink, shaper = Shaper} = State) -> |
|
|
|
|
|
io:format("IMY**********************111111111 ~p~n", [Event]), |
|
|
case lgUtil:checkHwm(Shaper, Event) of |
|
|
case lgUtil:checkHwm(Shaper, Event) of |
|
|
{true, _Drop, NewShaper} -> |
|
|
{true, _Drop, NewShaper} -> |
|
|
evalGl(Event, State#state{shaper = NewShaper}); |
|
|
evalGl(Event, State#state{shaper = NewShaper}); |
|
@ -584,3 +556,32 @@ get_value(Key, List, Default) -> |
|
|
|
|
|
|
|
|
supervisorName({local, Name}) -> Name; |
|
|
supervisorName({local, Name}) -> Name; |
|
|
supervisorName(Name) -> Name. |
|
|
supervisorName(Name) -> Name. |
|
|
|
|
|
|
|
|
|
|
|
shaperFun() -> |
|
|
|
|
|
SupSS = lgUtil:get_env(suppressSupStartStop, false), |
|
|
|
|
|
AppSS = lgUtil:get_env(suppressAppStartStop, false), |
|
|
|
|
|
if |
|
|
|
|
|
SupSS andalso AppSS -> |
|
|
|
|
|
fun suppress_supervisor_start_and_application_start/1; |
|
|
|
|
|
SupSS -> |
|
|
|
|
|
fun suppress_supervisor_start/1; |
|
|
|
|
|
AppSS -> |
|
|
|
|
|
fun suppress_application_start/1; |
|
|
|
|
|
true -> |
|
|
|
|
|
fun(_) -> false end |
|
|
|
|
|
end. |
|
|
|
|
|
|
|
|
|
|
|
suppress_supervisor_start_and_application_start(E) -> |
|
|
|
|
|
suppress_supervisor_start(E) orelse suppress_application_start(E). |
|
|
|
|
|
|
|
|
|
|
|
suppress_application_start({info_report, _GL, {_Pid, std_info, D}}) when is_list(D) -> |
|
|
|
|
|
lists:member({exited, stopped}, D); |
|
|
|
|
|
suppress_application_start({info_report, _GL, {_P, progress, D}}) -> |
|
|
|
|
|
lists:keymember(application, 1, D) andalso lists:keymember(started_at, 1, D); |
|
|
|
|
|
suppress_application_start(_) -> |
|
|
|
|
|
false. |
|
|
|
|
|
|
|
|
|
|
|
suppress_supervisor_start({info_report, _GL, {_P, progress, D}}) -> |
|
|
|
|
|
lists:keymember(started, 1, D) andalso lists:keymember(supervisor, 1, D); |
|
|
|
|
|
suppress_supervisor_start(_) -> |
|
|
|
|
|
false. |