From 4e938f04e1755253ad81e4fcfc7970821ab8bdf2 Mon Sep 17 00:00:00 2001 From: anlicheng <244108715@qq.com> Date: Fri, 30 Aug 2024 15:04:30 +0800 Subject: [PATCH] fix env --- apps/iot/priv/env.config | 2 +- apps/iot/src/iot_env.erl | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/iot/priv/env.config b/apps/iot/priv/env.config index 663b93e..f58cd89 100644 --- a/apps/iot/priv/env.config +++ b/apps/iot/priv/env.config @@ -1,5 +1,5 @@ [ {super_device_uuids, [ - {name, <<"test">>} + <<"29717641877153792017243119445063">> ]} ]. \ No newline at end of file diff --git a/apps/iot/src/iot_env.erl b/apps/iot/src/iot_env.erl index d5e4462..8bf2711 100644 --- a/apps/iot/src/iot_env.erl +++ b/apps/iot/src/iot_env.erl @@ -22,12 +22,14 @@ new() -> ets:new(iot_env, [public, set, named_table, {read_concurrency, true}, {keypos, 2}]), Envs = load_env(), + lager:debug("[iot_env] load envs: ~p", [Envs]), [ets:insert(iot_env, #env{key = Key, val = Val}) || {Key, Val} <- Envs], ok. -spec reload() -> ok. reload() -> Envs = load_env(), + lager:debug("[iot_env] load envs: ~p", [Envs]), [ets:insert(iot_env, #env{key = Key, val = Val}) || {Key, Val} <- Envs], ok.