This commit is contained in:
anlicheng 2025-09-17 11:27:52 +08:00
parent cdb75fa4e3
commit 823695aaa0
2 changed files with 2 additions and 4 deletions

View File

@ -71,8 +71,6 @@ stop_service(ServiceId) when is_binary(ServiceId) ->
supervisor:terminate_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) ->
Name = efka_service:get_name(ServiceId),
#{

View File

@ -109,8 +109,8 @@ terminate(Reason, _Req, State) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% ,
handle_request(#{<<"id">> := Id, <<"method">> := <<"register">>, <<"params">> := #{<<"container_name">> := ContainerName, <<"meta_tag">> := MetaTag}}, State) ->
case efka_container:get_pid(ContainerName) of
handle_request(#{<<"id">> := Id, <<"method">> := <<"register">>, <<"params">> := #{<<"service_id">> := ServiceId}}, State) ->
case efka_service:get_pid(ServiceId) of
undefined ->
lager:warning("[ws_channel] container_name: ~p, not running", [ContainerName]),
Reply = json_error(Id, -1, <<"container not running">>),