MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / startRuntime

Function startRuntime

agent/app/service/runtime_utils.go:146–160  ·  view source on GitHub ↗
(runtime *model.Runtime)

Source from the content-addressed store, hash-verified

144}
145
146func startRuntime(runtime *model.Runtime) {
147 if err := runComposeCmdWithLog("up", runtime.GetComposePath(), runtime.GetLogPath()); err != nil {
148 runtime.Status = constant.StatusError
149 runtime.Message = err.Error()
150 _ = runtimeRepo.Save(runtime)
151 return
152 }
153
154 if err := SyncRuntimeContainerStatus(runtime); err != nil {
155 runtime.Status = constant.StatusError
156 runtime.Message = err.Error()
157 _ = runtimeRepo.Save(runtime)
158 return
159 }
160}
161
162func reCreateRuntime(runtime *model.Runtime) {
163 var err error

Callers 2

handleRuntimeFunction · 0.85
handleRuntimeRecoverFunction · 0.85

Calls 6

runComposeCmdWithLogFunction · 0.85
SaveMethod · 0.65
GetComposePathMethod · 0.45
GetLogPathMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected