fix(region): sync with multi worker

This commit is contained in:
Qu Xuan
2021-08-19 15:10:35 +08:00
parent e5cc08d33b
commit 345f78621b
+1 -8
View File
@@ -443,14 +443,7 @@ func (self *SCloudproviderregion) DoSync(ctx context.Context, userCred mcclient.
}
func (self *SCloudproviderregion) getSyncTaskKey() string {
region, err := self.GetRegion()
if err != nil {
return self.CloudregionId
}
if len(region.ExternalId) > 0 {
return region.ExternalId
}
return self.CloudproviderId
return fmt.Sprintf("%d", self.RowId)
}
func (self *SCloudproviderregion) submitSyncTask(ctx context.Context, userCred mcclient.TokenCredential, syncRange SSyncRange) {