diff --git a/apps/efka/src/efka_micro_service_sup.erl b/apps/efka/src/efka_micro_service_sup.erl index 70963fe..b003989 100644 --- a/apps/efka/src/efka_micro_service_sup.erl +++ b/apps/efka/src/efka_micro_service_sup.erl @@ -68,9 +68,9 @@ init([]) -> %%% Internal functions %%%=================================================================== --spec register_service(ServiceId :: binary()) -> {ok, Pid :: pid()} | {error, Reason :: any()}. -register_service(ServiceId) when is_binary(ServiceId) -> - case supervisor:start_child(?MODULE, child_spec(ServiceId)) of +-spec register_service(Service :: #micro_service{}) -> {ok, Pid :: pid()} | {error, Reason :: any()}. +register_service(Service) -> + case supervisor:start_child(?MODULE, child_spec(Service)) of {ok, Pid} when is_pid(Pid) -> {ok, Pid}; {error, {'already_started', Pid}} when is_pid(Pid) ->