fix
This commit is contained in:
parent
fb4d7eeb98
commit
20c05dfb3a
@ -8,7 +8,7 @@
|
|||||||
sync,
|
sync,
|
||||||
jiffy,
|
jiffy,
|
||||||
%gpb,
|
%gpb,
|
||||||
%mnesia,
|
mnesia,
|
||||||
parse_trans,
|
parse_trans,
|
||||||
lager,
|
lager,
|
||||||
crypto,
|
crypto,
|
||||||
|
|||||||
@ -12,6 +12,7 @@
|
|||||||
start(_StartType, _StartArgs) ->
|
start(_StartType, _StartArgs) ->
|
||||||
io:setopts([{encoding, unicode}]),
|
io:setopts([{encoding, unicode}]),
|
||||||
%% 启动mnesia数据库
|
%% 启动mnesia数据库
|
||||||
|
start_mnesia(),
|
||||||
%% 加速内存的回收
|
%% 加速内存的回收
|
||||||
erlang:system_flag(fullsweep_after, 16),
|
erlang:system_flag(fullsweep_after, 16),
|
||||||
|
|
||||||
@ -30,6 +31,7 @@ start_mnesia() ->
|
|||||||
%% 启动数据库
|
%% 启动数据库
|
||||||
ok = mnesia:start(),
|
ok = mnesia:start(),
|
||||||
Tables = mnesia:system_info(tables),
|
Tables = mnesia:system_info(tables),
|
||||||
|
lager:debug("[efka_app] tables: ~p", [Tables]),
|
||||||
%% 创建数据库表
|
%% 创建数据库表
|
||||||
not lists:member(build_data, Tables) andalso mnesia_build_data:create_table(),
|
not lists:member(micro_service, Tables) andalso micro_service_model:create_table(),
|
||||||
not lists:member(counter, Tables) andalso mnesia_counter:create_table().
|
ok.
|
||||||
Loading…
x
Reference in New Issue
Block a user