fix iot_app
This commit is contained in:
parent
298e615794
commit
cc10502a58
@ -13,21 +13,18 @@
|
|||||||
|
|
||||||
start(_StartType, _StartArgs) ->
|
start(_StartType, _StartArgs) ->
|
||||||
io:setopts([{encoding, unicode}]),
|
io:setopts([{encoding, unicode}]),
|
||||||
%% 启动数据库
|
|
||||||
start_mnesia(),
|
|
||||||
%% 导入固定数据到mnesia
|
|
||||||
|
|
||||||
%% 加速内存的回收
|
%% 加速内存的回收
|
||||||
erlang:system_flag(fullsweep_after, 16),
|
erlang:system_flag(fullsweep_after, 16),
|
||||||
|
|
||||||
|
{ok, SupPid} = iot_sup:start_link(),
|
||||||
|
%% 启动数据库
|
||||||
|
start_mnesia(),
|
||||||
%% 启动udp服务
|
%% 启动udp服务
|
||||||
start_udp_server(),
|
start_udp_server(),
|
||||||
%% 启动http服务
|
%% 启动http服务
|
||||||
start_http_server(),
|
start_http_server(),
|
||||||
|
|
||||||
%% 启动连接池
|
{ok, SupPid}.
|
||||||
ok = hackney_pool:start_pool(influx_pool, [{timeout, 150000}, {max_connections, 100}]),
|
|
||||||
|
|
||||||
iot_sup:start_link().
|
|
||||||
|
|
||||||
stop(_State) ->
|
stop(_State) ->
|
||||||
ok.
|
ok.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user