mirror of
https://gitee.com/dgiiot/dgiot.git
synced 2024-11-30 03:07:40 +08:00
fix: device state
This commit is contained in:
parent
59c1516f40
commit
dbedd578a7
@ -42,7 +42,7 @@ parse_cache_Device(_ClassName) ->
|
||||
end,
|
||||
Query = #{
|
||||
<<"order">> => <<"updatedAt">>,
|
||||
<<"keys">> => [<<"ACL">>, <<"updatedAt">>, <<"devaddr">>, <<"status">>, <<"isEnable">>, <<"profile">>, <<"product">>, <<"location">>, <<"deviceSecret">>],
|
||||
<<"keys">> => [<<"ACL">>, <<"updatedAt">>, <<"state">>, <<"devaddr">>, <<"status">>, <<"isEnable">>, <<"profile">>, <<"product">>, <<"location">>, <<"deviceSecret">>],
|
||||
<<"where">> => #{}
|
||||
},
|
||||
dgiot_parse_loader:start(<<"Device">>, Query, 0, 100, 1000000, Success).
|
||||
|
@ -227,7 +227,13 @@ handle_message({data, Product, DevAddr, Data, Context}, #state{id = ChannelId} =
|
||||
%% 数据与产品,设备地址分离
|
||||
handle_message({sql, Sql}, #state{id = ChannelId} = State) ->
|
||||
dgiot_metrics:inc(dgiot_tdengine, <<"tdengine_recv">>, 1),
|
||||
dgiot_tdengine:batch_sql(ChannelId, Sql),
|
||||
case catch dgiot_tdengine:batch_sql(ChannelId, Sql) of
|
||||
{Err, Reason} when Err == error; Err == 'EXIT' ->
|
||||
dgiot_bridge:send_log(ChannelId, "Save to Tdengine error, ~p, ~p", [Sql, Reason]),
|
||||
ok;
|
||||
_ ->
|
||||
pass
|
||||
end,
|
||||
{ok, State};
|
||||
|
||||
%% 规则引擎导入
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 9303052c9aee6e4f9cc38249a1e800e686c4c775
|
||||
Subproject commit 2ace04bea5a1e77fee19bbe189a76e40f55c862f
|
Loading…
Reference in New Issue
Block a user