mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-10-31 02:38:07 +08:00
fix: cloud provider sync time is not set in auto-sync cycles
This commit is contained in:
@@ -867,6 +867,9 @@ func (provider *SCloudprovider) GetEnabledCloudproviderRegions() []SCloudprovide
|
||||
}
|
||||
|
||||
func (provider *SCloudprovider) syncCloudproviderRegions(userCred mcclient.TokenCredential, syncRange *SSyncRange, wg *sync.WaitGroup) {
|
||||
if wg == nil {
|
||||
provider.MarkSyncing(userCred)
|
||||
}
|
||||
cprs := provider.GetEnabledCloudproviderRegions()
|
||||
for i := range cprs {
|
||||
if cprs[i].needSync() {
|
||||
@@ -882,6 +885,9 @@ func (provider *SCloudprovider) syncCloudproviderRegions(userCred mcclient.Token
|
||||
}
|
||||
}
|
||||
}
|
||||
if wg == nil {
|
||||
provider.MarkEndSync(userCred)
|
||||
}
|
||||
}
|
||||
|
||||
func (provider *SCloudprovider) SyncCallSyncCloudproviderRegions(userCred mcclient.TokenCredential, syncRange *SSyncRange) {
|
||||
|
||||
Reference in New Issue
Block a user