fix env
This commit is contained in:
parent
dabb9aee2f
commit
4e938f04e1
@ -1,5 +1,5 @@
|
||||
[
|
||||
{super_device_uuids, [
|
||||
{name, <<"test">>}
|
||||
<<"29717641877153792017243119445063">>
|
||||
]}
|
||||
].
|
||||
@ -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.
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user