ED-96: enable to ignore wapi init (#380)

This commit is contained in:
dinama 2021-03-29 18:14:55 +03:00 committed by GitHub
parent d8c333429c
commit 2665cb62bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,13 +25,13 @@ start_link() ->
%% %%
-spec init -spec init
(undefined) -> ignore; (undefined) -> {ok, {supervisor:sup_flags(), []}};
([]) -> {ok, {supervisor:sup_flags(), [supervisor:child_spec()]}}. ([]) -> {ok, {supervisor:sup_flags(), [supervisor:child_spec()]}}.
init(undefined) -> init(undefined) ->
% TODO #ED-96 на период разделения отсутствие настройки wapi - % TODO #ED-96 на период разделения отсутствие настройки wapi -
% считаем признаком запуска только fistful-server % считаем признаком запуска только fistful-server
_ = logger:warning("wapi is not configured - launch will be ignored"), _ = logger:warning("wapi is not configured - init will be ignored"),
ignore; {ok, {{one_for_all, 0, 1}, []}};
init([]) -> init([]) ->
LechiffreOpts = genlib_app:env(wapi, lechiffre_opts), LechiffreOpts = genlib_app:env(wapi, lechiffre_opts),
LechiffreSpec = lechiffre:child_spec(lechiffre, LechiffreOpts), LechiffreSpec = lechiffre:child_spec(lechiffre, LechiffreOpts),