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

Function handleRuntimeDetailID

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

Source from the content-addressed store, hash-verified

1131}
1132
1133func handleRuntimeDetailID(runtime model.Runtime) (uint, uint) {
1134 app, _ := appRepo.GetFirst(appRepo.WithKey(runtime.Type))
1135 if app.ID == 0 {
1136 return 0, 0
1137 }
1138 appDetail, _ := appDetailRepo.GetFirst(appDetailRepo.WithVersion(runtime.Version), appDetailRepo.WithAppId(app.ID))
1139 if appDetail.ID == 0 {
1140 return 0, 0
1141 }
1142 runtime.AppDetailID = appDetail.ID
1143 _ = runtimeRepo.Save(&runtime)
1144 return app.ID, appDetail.ID
1145}

Callers 1

PageMethod · 0.85

Calls 5

GetFirstMethod · 0.65
WithKeyMethod · 0.65
WithVersionMethod · 0.65
WithAppIdMethod · 0.65
SaveMethod · 0.65

Tested by

no test coverage detected