This commit is contained in:
anlicheng 2025-04-30 12:01:21 +08:00
parent fb4d7eeb98
commit 20c05dfb3a
2 changed files with 5 additions and 3 deletions

View File

@ -8,7 +8,7 @@
sync, sync,
jiffy, jiffy,
%gpb, %gpb,
%mnesia, mnesia,
parse_trans, parse_trans,
lager, lager,
crypto, crypto,

View File

@ -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.