From 2031295ba47294c00cb2b6d743e6d6931e5abe07 Mon Sep 17 00:00:00 2001 From: zhengkunwang <31820853+zhengkunwang223@users.noreply.github.com> Date: Thu, 12 Oct 2023 05:00:38 -0500 Subject: [PATCH] =?UTF-8?q?feat:=20Node.js=20=E7=8E=AF=E5=A2=83=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E4=B8=8B=E8=BD=BD=E7=BB=9F=E8=AE=A1=20(#2528)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/service/runtime_utils.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/backend/app/service/runtime_utils.go b/backend/app/service/runtime_utils.go index 0c5ceb92c..6cc9a2619 100644 --- a/backend/app/service/runtime_utils.go +++ b/backend/app/service/runtime_utils.go @@ -13,6 +13,7 @@ import ( "github.com/pkg/errors" "github.com/subosito/gotenv" "io" + "net/http" "os" "os/exec" "path" @@ -45,7 +46,16 @@ func handleNode(create request.RuntimeCreate, runtime *model.Runtime, fileOp fil runtime.Status = constant.RuntimeCreating runtime.CodeDir = create.CodeDir + nodeDetail, err := appDetailRepo.GetFirst(commonRepo.WithByID(runtime.AppDetailID)) + if err != nil { + return err + } + + go func() { + _, _ = http.Get(nodeDetail.DownloadCallBackUrl) + }() go startRuntime(runtime) + return }