fix
This commit is contained in:
parent
d2c57bc2bf
commit
f5defe2638
@ -223,25 +223,17 @@ handle_info({timeout, _, data_ticker}, State = #state{aes = Aes, topic = Topic})
|
|||||||
<<"service_name">> => <<"shuibiao">>,
|
<<"service_name">> => <<"shuibiao">>,
|
||||||
<<"at">> => iot_util:timestamp(),
|
<<"at">> => iot_util:timestamp(),
|
||||||
<<"fields">> => [
|
<<"fields">> => [
|
||||||
#{
|
#{<<"used">> => rand:uniform(2048 * 2)}
|
||||||
<<"used">> => rand:uniform(2048 * 2)
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
<<"tags">> => #{
|
<<"tags">> => #{}
|
||||||
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
#{
|
#{
|
||||||
<<"service_name">> => <<"shuibiao:123">>,
|
<<"service_name">> => <<"shuibiao:123">>,
|
||||||
<<"at">> => iot_util:timestamp(),
|
<<"at">> => iot_util:timestamp(),
|
||||||
<<"fields">> => [
|
<<"fields">> => [
|
||||||
#{
|
#{<<"used">> => rand:uniform(2048 * 2)}
|
||||||
<<"used">> => rand:uniform(2048 * 2)
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
<<"tags">> => #{
|
<<"tags">> => #{}
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
@ -260,7 +252,7 @@ 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),
|
% erlang:start_timer(?TICKER_INTERVAL + 2000 + rand:uniform(5000), self(), data_ticker),
|
||||||
|
|
||||||
{noreply, State};
|
{noreply, State};
|
||||||
|
|
||||||
@ -300,8 +292,6 @@ handle_info({timeout, _, inform_ticker}, State = #state{aes = Aes, topic = Topic
|
|||||||
lager:debug("[host_mocker] send inform failed, reason: ~p", [Reason])
|
lager:debug("[host_mocker] send inform failed, reason: ~p", [Reason])
|
||||||
end,
|
end,
|
||||||
|
|
||||||
erlang:start_timer(?TICKER_INTERVAL + 2000 + rand:uniform(5000), self(), data_ticker),
|
|
||||||
|
|
||||||
{noreply, State};
|
{noreply, State};
|
||||||
|
|
||||||
%% 上传微服务的feedback_result信息
|
%% 上传微服务的feedback_result信息
|
||||||
@ -328,8 +318,6 @@ handle_info({timeout, _, feedback_ticker}, State = #state{aes = Aes, topic = Top
|
|||||||
lager:debug("[host_mocker] send inform failed, reason: ~p", [Reason])
|
lager:debug("[host_mocker] send inform failed, reason: ~p", [Reason])
|
||||||
end,
|
end,
|
||||||
|
|
||||||
erlang:start_timer(?TICKER_INTERVAL + 2000 + rand:uniform(5000), self(), data_ticker),
|
|
||||||
|
|
||||||
{noreply, State};
|
{noreply, State};
|
||||||
|
|
||||||
%% 周期行的ping逻辑
|
%% 周期行的ping逻辑
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user