mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-03-17 03:04:46 +08:00
feat: Node.js 环境增加下载统计 (#2528)
This commit is contained in:
parent
f079050545
commit
2031295ba4
@ -13,6 +13,7 @@ import (
|
|||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/subosito/gotenv"
|
"github.com/subosito/gotenv"
|
||||||
"io"
|
"io"
|
||||||
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"path"
|
"path"
|
||||||
@ -45,7 +46,16 @@ func handleNode(create request.RuntimeCreate, runtime *model.Runtime, fileOp fil
|
|||||||
runtime.Status = constant.RuntimeCreating
|
runtime.Status = constant.RuntimeCreating
|
||||||
runtime.CodeDir = create.CodeDir
|
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)
|
go startRuntime(runtime)
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user