fix
This commit is contained in:
parent
cdb75fa4e3
commit
823695aaa0
@ -71,8 +71,6 @@ stop_service(ServiceId) when is_binary(ServiceId) ->
|
|||||||
supervisor:terminate_child(?MODULE, ChildId),
|
supervisor:terminate_child(?MODULE, ChildId),
|
||||||
supervisor:delete_child(?MODULE, ChildId).
|
supervisor:delete_child(?MODULE, ChildId).
|
||||||
|
|
||||||
child_spec(#service{service_id = ServiceId}) when is_binary(ServiceId) ->
|
|
||||||
child_spec(ServiceId);
|
|
||||||
child_spec(ServiceId) when is_binary(ServiceId) ->
|
child_spec(ServiceId) when is_binary(ServiceId) ->
|
||||||
Name = efka_service:get_name(ServiceId),
|
Name = efka_service:get_name(ServiceId),
|
||||||
#{
|
#{
|
||||||
|
|||||||
@ -109,8 +109,8 @@ terminate(Reason, _Req, State) ->
|
|||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
|
||||||
%% 注册, 要建立程序和容器之间的关系
|
%% 注册, 要建立程序和容器之间的关系
|
||||||
handle_request(#{<<"id">> := Id, <<"method">> := <<"register">>, <<"params">> := #{<<"container_name">> := ContainerName, <<"meta_tag">> := MetaTag}}, State) ->
|
handle_request(#{<<"id">> := Id, <<"method">> := <<"register">>, <<"params">> := #{<<"service_id">> := ServiceId}}, State) ->
|
||||||
case efka_container:get_pid(ContainerName) of
|
case efka_service:get_pid(ServiceId) of
|
||||||
undefined ->
|
undefined ->
|
||||||
lager:warning("[ws_channel] container_name: ~p, not running", [ContainerName]),
|
lager:warning("[ws_channel] container_name: ~p, not running", [ContainerName]),
|
||||||
Reply = json_error(Id, -1, <<"container not running">>),
|
Reply = json_error(Id, -1, <<"container not running">>),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user