fix env
This commit is contained in:
parent
dabb9aee2f
commit
4e938f04e1
@ -1,5 +1,5 @@
|
|||||||
[
|
[
|
||||||
{super_device_uuids, [
|
{super_device_uuids, [
|
||||||
{name, <<"test">>}
|
<<"29717641877153792017243119445063">>
|
||||||
]}
|
]}
|
||||||
].
|
].
|
||||||
@ -22,12 +22,14 @@
|
|||||||
new() ->
|
new() ->
|
||||||
ets:new(iot_env, [public, set, named_table, {read_concurrency, true}, {keypos, 2}]),
|
ets:new(iot_env, [public, set, named_table, {read_concurrency, true}, {keypos, 2}]),
|
||||||
Envs = load_env(),
|
Envs = load_env(),
|
||||||
|
lager:debug("[iot_env] load envs: ~p", [Envs]),
|
||||||
[ets:insert(iot_env, #env{key = Key, val = Val}) || {Key, Val} <- Envs],
|
[ets:insert(iot_env, #env{key = Key, val = Val}) || {Key, Val} <- Envs],
|
||||||
ok.
|
ok.
|
||||||
|
|
||||||
-spec reload() -> ok.
|
-spec reload() -> ok.
|
||||||
reload() ->
|
reload() ->
|
||||||
Envs = load_env(),
|
Envs = load_env(),
|
||||||
|
lager:debug("[iot_env] load envs: ~p", [Envs]),
|
||||||
[ets:insert(iot_env, #env{key = Key, val = Val}) || {Key, Val} <- Envs],
|
[ets:insert(iot_env, #env{key = Key, val = Val}) || {Key, Val} <- Envs],
|
||||||
ok.
|
ok.
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user