mirror of
https://gitee.com/rainbond/Rainbond.git
synced 2024-12-02 11:47:36 +08:00
Merge branch 'master' into fix-memory
This commit is contained in:
commit
7d5d77fd4c
@ -2712,7 +2712,15 @@ func (s *ServiceAction) SyncComponentProbes(tx *gorm.DB, components []*api_model
|
||||
)
|
||||
for _, component := range components {
|
||||
componentIDs = append(componentIDs, component.ComponentBase.ComponentID)
|
||||
probes = append(probes, component.Probe.DbModel(component.ComponentBase.ComponentID))
|
||||
modes := make(map[string]struct{})
|
||||
for _, probe := range component.Probes {
|
||||
_, ok := modes[probe.Mode]
|
||||
if ok {
|
||||
continue
|
||||
}
|
||||
probes = append(probes, probe.DbModel(component.ComponentBase.ComponentID))
|
||||
modes[probe.Mode] = struct{}{}
|
||||
}
|
||||
}
|
||||
if err := db.GetManager().ServiceProbeDaoTransactions(tx).DeleteByComponentIDs(componentIDs); err != nil {
|
||||
return err
|
||||
|
@ -243,7 +243,7 @@ type Component struct {
|
||||
Ports []TenantServicesPort `json:"ports"`
|
||||
Relations []TenantComponentRelation `json:"relations"`
|
||||
Envs []ComponentEnv `json:"envs"`
|
||||
Probe ServiceProbe `json:"probe"`
|
||||
Probes []ServiceProbe `json:"probes"`
|
||||
AppConfigGroupRels []AppConfigGroupRelations `json:"app_config_groups"`
|
||||
Labels []ComponentLabel `json:"labels"`
|
||||
Plugins []ComponentPlugin `json:"plugins"`
|
||||
|
Loading…
Reference in New Issue
Block a user