换成单集群模式
This commit is contained in:
@@ -18,16 +18,14 @@ func notifyHTTPDNSAppTasksByApp(tx *dbs.Tx, app *models.HTTPDNSApp, taskType mod
|
||||
return nil
|
||||
}
|
||||
|
||||
primaryClusterId := int64(app.PrimaryClusterId)
|
||||
backupClusterId := int64(app.BackupClusterId)
|
||||
|
||||
err := notifyHTTPDNSClusterTask(tx, primaryClusterId, taskType)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if backupClusterId > 0 && backupClusterId != primaryClusterId {
|
||||
err = notifyHTTPDNSClusterTask(tx, backupClusterId, taskType)
|
||||
clusterIds := models.SharedHTTPDNSAppDAO.ReadAppClusterIds(app)
|
||||
notified := map[int64]bool{}
|
||||
for _, clusterId := range clusterIds {
|
||||
if clusterId <= 0 || notified[clusterId] {
|
||||
continue
|
||||
}
|
||||
notified[clusterId] = true
|
||||
err := notifyHTTPDNSClusterTask(tx, clusterId, taskType)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user