fix: 解决 node.js 网站备份恢复之后运行环境一直启动中的问题 (#2462)

pull/2464/head
zhengkunwang 1 year ago committed by GitHub
parent 5bb77d7176
commit 825fe792e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -7,7 +7,6 @@ import (
"github.com/1Panel-dev/1Panel/backend/app/model"
"github.com/1Panel-dev/1Panel/backend/constant"
"github.com/1Panel-dev/1Panel/backend/global"
"github.com/1Panel-dev/1Panel/backend/utils/compose"
"github.com/1Panel-dev/1Panel/backend/utils/files"
"io/fs"
"os"
@ -52,7 +51,7 @@ func handleRuntimeRecover(runtime *model.Runtime, recoverFile string, isRollback
}
tmpPath := strings.ReplaceAll(recoverFile, ".tar.gz", "")
defer func() {
_, _ = compose.Up(runtime.GetComposePath())
go startRuntime(runtime)
_ = os.RemoveAll(strings.ReplaceAll(recoverFile, ".tar.gz", ""))
}()

Loading…
Cancel
Save