Signed-off-by: weishaoxiong <weishaoxiong2@huawei.com>
This commit is contained in:
weishaoxiong 2024-08-06 11:32:22 +08:00
parent 79567f103f
commit 29580c585e
2 changed files with 4 additions and 1 deletions

View File

@ -37,6 +37,7 @@ enum SyncTriggerMode {
MODE_ONLINE,
MODE_UNLOCK,
MODE_BROADCASTER,
MODE_CONSISTENCY,
};
struct GenStatistic {

View File

@ -345,7 +345,9 @@ bool CloudServiceImpl::DoKvCloudSync(int32_t userId, const std::string &bundleNa
}
for (auto user : users) {
for (const auto &store : stores) {
syncManager_.DoCloudSync(SyncManager::SyncInfo(user, store.bundleName, store.storeId, {}, triggerMode));
int32_t mode = (store.bundleName != bundleName && triggerMode == MODE_PUSH) ? MODE_CONSISTENCY
: triggerMode;
syncManager_.DoCloudSync(SyncManager::SyncInfo(user, store.bundleName, store.storeId, {}, mode));
}
}
return found;