From 9d4556a97e0e70df48ed1bdd41c06ff2066cfd74 Mon Sep 17 00:00:00 2001 From: anlicheng <244108715@qq.com> Date: Wed, 7 May 2025 17:40:41 +0800 Subject: [PATCH] fix --- apps/efka/src/efka_inetd_task.erl | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/apps/efka/src/efka_inetd_task.erl b/apps/efka/src/efka_inetd_task.erl index 7a76a25..b3c72f2 100644 --- a/apps/efka/src/efka_inetd_task.erl +++ b/apps/efka/src/efka_inetd_task.erl @@ -105,16 +105,8 @@ handle_cast(deploy, State = #state{task_id = TaskId, root_dir = RootDir, service %% 状态: 0: 停止, 1: 运行中 status = 0 }), - - %% 正常启动服务 - case boot_service(ServiceId) of - {ok, Pid} when is_pid(Pid) -> - efka_agent:feedback_phase(TaskId, efka_util:timestamp(), <<"boot success">>), - {stop, normal, State}; - {error, Reason} -> - efka_agent:feedback_phase(TaskId, efka_util:timestamp(), <<"boot failed">>), - {stop, {error, Reason}, State} - end; + efka_agent:feedback_phase(TaskId, efka_util:timestamp(), <<"deploy success">>), + {stop, normal, State}; {error, Reason} -> efka_agent:feedback_phase(TaskId, efka_util:timestamp(), <<"tar decompression error">>), {stop, {error, Reason}, State} @@ -238,16 +230,6 @@ check_download_url(Url) when is_list(Url) -> {error, Reason} end. --spec boot_service(ServiceId :: binary()) -> {ok, Pid :: pid()} | {error, Reason :: any()}. -boot_service(ServiceId) -> - %% 正常启动服务 - case efka_micro_service:get_pid(ServiceId) of - undefined -> - efka_micro_service_sup:start_service(ServiceId); - Pid -> - {ok, Pid} - end. - %% 解压文件到指定目录 -spec tar_extract(TarFile :: string(), TargetDir :: string()) -> ok | {error, Reason :: term()}. tar_extract(TarFile, TargetDir) when is_list(TarFile), is_list(TargetDir) ->