fix
This commit is contained in:
parent
f5defe2638
commit
e5dc938c13
@ -188,11 +188,9 @@ handle_info({publish, #{payload := Payload, qos := Qos, topic := FromTopic}},
|
|||||||
case jiffy:decode(Command, [return_maps]) of
|
case jiffy:decode(Command, [return_maps]) of
|
||||||
#{<<"aes">> := Aes, <<"a">> := true} ->
|
#{<<"aes">> := Aes, <<"a">> := true} ->
|
||||||
%% 启动周期ping
|
%% 启动周期ping
|
||||||
% erlang:start_timer(?TICKER_INTERVAL, self(), ping_ticker),
|
erlang:start_timer(?TICKER_INTERVAL, self(), ping_ticker),
|
||||||
|
|
||||||
%% 数据收集
|
%% 数据收集
|
||||||
% erlang:start_timer(?TICKER_INTERVAL + 1000, self(), data_ticker),
|
erlang:start_timer(?TICKER_INTERVAL + 1000, self(), data_ticker),
|
||||||
|
|
||||||
%% 触发inform上传
|
%% 触发inform上传
|
||||||
erlang:start_timer(?TICKER_INTERVAL, self(), inform_ticker),
|
erlang:start_timer(?TICKER_INTERVAL, self(), inform_ticker),
|
||||||
erlang:start_timer(?TICKER_INTERVAL, self(), feedback_ticker),
|
erlang:start_timer(?TICKER_INTERVAL, self(), feedback_ticker),
|
||||||
@ -252,8 +250,6 @@ handle_info({timeout, _, data_ticker}, State = #state{aes = Aes, topic = Topic})
|
|||||||
lager:debug("[host_mocker] send data failed, reason: ~p", [Reason])
|
lager:debug("[host_mocker] send data failed, reason: ~p", [Reason])
|
||||||
end,
|
end,
|
||||||
|
|
||||||
% erlang:start_timer(?TICKER_INTERVAL + 2000 + rand:uniform(5000), self(), data_ticker),
|
|
||||||
|
|
||||||
{noreply, State};
|
{noreply, State};
|
||||||
|
|
||||||
%% 上传微服务的inform信息
|
%% 上传微服务的inform信息
|
||||||
@ -358,8 +354,6 @@ handle_info({timeout, _, ping_ticker}, State = #state{aes = Aes, topic = Topic})
|
|||||||
lager:debug("[host_mocker] send ping failed, reason: ~p", [Reason])
|
lager:debug("[host_mocker] send ping failed, reason: ~p", [Reason])
|
||||||
end,
|
end,
|
||||||
|
|
||||||
erlang:start_timer(?TICKER_INTERVAL, self(), ping_ticker),
|
|
||||||
|
|
||||||
{noreply, State}.
|
{noreply, State}.
|
||||||
|
|
||||||
%% @private
|
%% @private
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user