fix
This commit is contained in:
parent
08fb916f77
commit
42ee5ccaa3
@ -112,7 +112,8 @@ handle_request("POST", "/host/activate", _, #{<<"uuid">> := UUID, <<"auth">> :=
|
|||||||
lager:debug("[host_handler] activate host_id: ~p, failed with reason: ~p", [UUID, Reason]),
|
lager:debug("[host_handler] activate host_id: ~p, failed with reason: ~p", [UUID, Reason]),
|
||||||
{ok, 200, iot_util:json_error(400, <<"host not found">>)};
|
{ok, 200, iot_util:json_error(400, <<"host not found">>)};
|
||||||
{ok, Pid} when is_pid(Pid) ->
|
{ok, Pid} when is_pid(Pid) ->
|
||||||
case iot_host:has_session(Pid) of
|
%% 激活的话不管是否存在会话都需要通知
|
||||||
|
case iot_host:has_session(Pid) or Auth of
|
||||||
true ->
|
true ->
|
||||||
lager:debug("[host_handler] activate host_id: ~p, start", [UUID]),
|
lager:debug("[host_handler] activate host_id: ~p, start", [UUID]),
|
||||||
{ok, Assoc} = iot_host:make_assoc(Pid),
|
{ok, Assoc} = iot_host:make_assoc(Pid),
|
||||||
|
|||||||
@ -110,7 +110,6 @@ t = 8
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"service_name": "从该设备端的哪个服务采集的数据",
|
"service_name": "从该设备端的哪个服务采集的数据",
|
||||||
"node_name": "节点名称", insert到influxdb的时候就是表名
|
|
||||||
"at": int, 精确到毫秒
|
"at": int, 精确到毫秒
|
||||||
// 该微服务采集的数据,是一个包含map的列表类型,map的内容可以由微服务自己指定
|
// 该微服务采集的数据,是一个包含map的列表类型,map的内容可以由微服务自己指定
|
||||||
// 目前一般的格式是"metric-name": $value样式的数据
|
// 目前一般的格式是"metric-name": $value样式的数据
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user