mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix(region): optimized sku sched clear
This commit is contained in:
@@ -153,11 +153,6 @@ func syncRegionSkus(ctx context.Context, userCred mcclient.TokenCredential, loca
|
||||
// logSyncFailed(provider, task, msg)
|
||||
return
|
||||
}
|
||||
|
||||
_, err = modules.SchedManager.SyncSku(auth.GetAdminSession(ctx, options.Options.Region, ""), false)
|
||||
if err != nil {
|
||||
log.Errorf("SchedManager SyncSku %s", err)
|
||||
}
|
||||
}
|
||||
|
||||
if localRegion.GetDriver().IsSupportedElasticcache() {
|
||||
|
||||
@@ -1257,6 +1257,13 @@ func (manager *SServerSkuManager) SyncServerSkus(ctx context.Context, userCred m
|
||||
syncResult.Add()
|
||||
}
|
||||
}
|
||||
|
||||
// notfiy sched manager
|
||||
_, err = modules.SchedManager.SyncSku(auth.GetAdminSession(ctx, options.Options.Region, ""), false)
|
||||
if err != nil {
|
||||
log.Errorf("SchedManager SyncSku %s", err)
|
||||
}
|
||||
|
||||
return syncResult
|
||||
}
|
||||
|
||||
|
||||
@@ -479,12 +479,6 @@ func SyncServerSkusByRegion(ctx context.Context, userCred mcclient.TokenCredenti
|
||||
notes := fmt.Sprintf("SyncServerSkusByRegion %s result: %s", region.Name, result.Result())
|
||||
log.Infof(notes)
|
||||
|
||||
// notfiy sched manager
|
||||
_, err = modules.SchedManager.SyncSku(auth.GetAdminSession(ctx, options.Options.Region, ""), false)
|
||||
if err != nil {
|
||||
log.Errorf("SchedManager SyncSku %s", err)
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user