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

Method BatchUpgrade

agent/app/service/agents.go:334–353  ·  view source on GitHub ↗
(req dto.AgentBatchUpgradeReq)

Source from the content-addressed store, hash-verified

332}
333
334func (a AgentService) BatchUpgrade(req dto.AgentBatchUpgradeReq) ([]dto.AgentBatchUpgradeResult, error) {
335 plans, results, err := buildBatchUpgradePlans(req)
336 if err != nil {
337 return nil, err
338 }
339 for _, plan := range plans {
340 result := dto.AgentBatchUpgradeResult{
341 AgentID: plan.ctx.agent.ID,
342 AgentName: plan.ctx.agent.Name,
343 AppInstallID: plan.ctx.agent.AppInstallID,
344 }
345 if err := upgradeInstall(plan.req); err != nil {
346 result.Message = err.Error()
347 } else {
348 result.Success = true
349 }
350 results = append(results, result)
351 }
352 return results, nil
353}
354
355func (a AgentService) BatchInstallSkill(req dto.AgentBatchSkillInstallReq) ([]dto.AgentBatchSkillInstallResult, error) {
356 if req.AgentType != constant.AppOpenclaw && req.AgentType != constant.AppHermesAgent {

Callers

nothing calls this directly

Calls 3

buildBatchUpgradePlansFunction · 0.85
upgradeInstallFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected