فهرست منبع

pass batchsize to recountAndUpdateDescendantCountOfPages

yohei0125 3 سال پیش
والد
کامیت
e4cdcf8b24
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      packages/app/src/server/service/page.ts

+ 2 - 2
packages/app/src/server/service/page.ts

@@ -3070,7 +3070,7 @@ class PageService {
     builder.addConditionToSortPagesByDescPath();
 
     const aggregatedPages = await builder.query.lean().cursor({ batchSize: BATCH_SIZE });
-    await this.recountAndUpdateDescendantCountOfPages(aggregatedPages);
+    await this.recountAndUpdateDescendantCountOfPages(aggregatedPages, BATCH_SIZE);
   }
 
   /**
@@ -3086,7 +3086,7 @@ class PageService {
     builder.addConditionToSortPagesByDescPath(); // sort in DESC
 
     const aggregatedPages = await builder.query.lean().cursor({ batchSize: BATCH_SIZE });
-    await this.recountAndUpdateDescendantCountOfPages(aggregatedPages);
+    await this.recountAndUpdateDescendantCountOfPages(aggregatedPages, BATCH_SIZE);
   }
 
   /**