|
@@ -20,7 +20,7 @@ start_link() ->
|
|
init([]) ->
|
|
init([]) ->
|
|
[ ets:new(T, ets_tables_opts()) || T <- ets_tables() ],
|
|
[ ets:new(T, ets_tables_opts()) || T <- ets_tables() ],
|
|
|
|
|
|
- case application:get_env(n2o, mq, "") of
|
|
|
|
|
|
+ case application:get_env(n4u, mq, "") of
|
|
n2o_syn -> syn:init();
|
|
n2o_syn -> syn:init();
|
|
_ -> ok
|
|
_ -> ok
|
|
end,
|
|
end,
|
|
@@ -36,7 +36,7 @@ timer_restart(Diff) ->
|
|
erlang:send_after(1000 * (Z + 60 * Y + 60 * 60 * X), erlang:self(), {timer, ping}).
|
|
erlang:send_after(1000 * (Z + 60 * Y + 60 * 60 * X), erlang:self(), {timer, ping}).
|
|
|
|
|
|
|
|
|
|
-ping() -> application:get_env(n2o, timer, {0, 10, 0}).
|
|
|
|
|
|
+ping() -> application:get_env(n4u, timer, {0, 10, 0}).
|
|
|
|
|
|
|
|
|
|
proc(init, #handler{}=Async) ->
|
|
proc(init, #handler{}=Async) ->
|
|
@@ -50,6 +50,6 @@ proc({timer, ping}, #handler{state=Timer}=Async) ->
|
|
_ -> erlang:cancel_timer(Timer)
|
|
_ -> erlang:cancel_timer(Timer)
|
|
end,
|
|
end,
|
|
wf:info(?MODULE, "n4u Timer: ~p~n", [ping]),
|
|
wf:info(?MODULE, "n4u Timer: ~p~n", [ping]),
|
|
- (application:get_env(n2o, session, n2o_session)):invalidate_sessions(),
|
|
|
|
|
|
+ (application:get_env(n4u, session, n2o_session)):invalidate_sessions(),
|
|
wf:invalidate_cache(),
|
|
wf:invalidate_cache(),
|
|
{reply, ok, Async#handler{state=timer_restart(ping())}}.
|
|
{reply, ok, Async#handler{state=timer_restart(ping())}}.
|