1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-01-19 00:09:16 +08:00

feat: Node.js 环境增加下载统计 (#2528)

This commit is contained in:
zhengkunwang 2023-10-12 05:00:38 -05:00 committed by GitHub
parent f079050545
commit 2031295ba4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
}