Skip to content

Commit

Permalink
fixed skip for mongo query
Browse files Browse the repository at this point in the history
  • Loading branch information
avneesh-akto committed Sep 19, 2024
1 parent 1167d4c commit b97647e
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2362,7 +2362,7 @@ private static void backFillDiscovered() {
)
);
}
ApiInfoDao.instance.getMCollection().bulkWrite(updates);
if (!updates.isEmpty()) ApiInfoDao.instance.getMCollection().bulkWrite(updates);

} while (!singleTypeInfos.isEmpty());

Expand All @@ -2383,6 +2383,7 @@ private static void backFillStatusCodeType() {
int skip = 0;
do {
sampleDataList = SampleDataDao.instance.findAll(Filters.empty(), skip, 100, sort);
skip += sampleDataList.size();
List<ApiInfo> apiInfoList = new ArrayList<>();
for (SampleData sampleData: sampleDataList) {
Key id = sampleData.getId();
Expand Down Expand Up @@ -2425,7 +2426,7 @@ private static void backFillStatusCodeType() {
)
);
}
ApiInfoDao.instance.getMCollection().bulkWrite(updates);
if (!updates.isEmpty()) ApiInfoDao.instance.getMCollection().bulkWrite(updates);

} while (!sampleDataList.isEmpty());

Expand Down

0 comments on commit b97647e

Please sign in to comment.