Skip to content

Commit

Permalink
add deprecated modules (#6458)
Browse files Browse the repository at this point in the history
module names are taken from env which may be changed at startup
by changing sys.config.

this makes sure that deprecated modules
are removed from the list in cae a sys.config was changed
or not chagned and still has reference to missing module

a better way would be to ensure that the module exists
but i was out of time :)
  • Loading branch information
lazedo authored Apr 9, 2020
1 parent 2d8b4da commit 8c604f2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion applications/ecallmgr/src/ecallmgr_fs_node_sup.erl
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
-define(NODE_WORKER, ?NODE_CHILD_TYPE(<<"worker">>)).
-define(NODE_SUPERVISOR, ?NODE_CHILD_TYPE(<<"supervisor">>)).

-define(DEPRECATED_MODS, [<<"msg">>]).
%%==============================================================================
%% API functions
%%==============================================================================
Expand Down Expand Up @@ -113,7 +114,7 @@ init([Node, Options]) ->

NodeB = kz_term:to_binary(Node),
Args = [Node, Options],
M = kazoo_bindings:map(<<"freeswitch.node.modules">>, []),
M = kazoo_bindings:map(<<"freeswitch.node.modules">>, []) -- ?DEPRECATED_MODS,
Modules = lists:foldl(fun(A, B) -> A ++ B end, [], M),
JObj = maybe_correct_modules(Modules),
Children = kz_json:foldr(fun(Module, V, Acc) ->
Expand Down

0 comments on commit 8c604f2

Please sign in to comment.