Răsfoiți Sursa

fix code comments

Yuki Takei 5 ani în urmă
părinte
comite
7231e5599c
2 a modificat fișierele cu 4 adăugiri și 4 ștergeri
  1. 2 2
      src/server/service/export.js
  2. 2 2
      src/server/service/import.js

+ 2 - 2
src/server/service/export.js

@@ -52,7 +52,7 @@ class ExportService {
   async getStatus() {
     const zipFiles = fs.readdirSync(this.baseDir).filter(file => path.extname(file) === '.zip');
 
-    // sequencial read
+    // process serially so as not to waste memory
     const zipFileStats = [];
     const parseZipFilePromises = zipFiles.map((file) => {
       const zipFile = this.getFile(file);
@@ -205,7 +205,7 @@ class ExportService {
   async exportCollectionsToZippedJson(collections) {
     const metaJson = await this.createMetaJson();
 
-    // sequencial read
+    // process serially so as not to waste memory
     const jsonFiles = [];
     const jsonFilesPromises = collections.map(collectionName => this.exportCollectionToJson(collectionName));
     for await (const jsonFile of jsonFilesPromises) {

+ 2 - 2
src/server/service/import.js

@@ -129,7 +129,7 @@ class ImportService {
   async getStatus() {
     const zipFiles = fs.readdirSync(this.baseDir).filter(file => path.extname(file) === '.zip');
 
-    // sequencial read
+    // process serially so as not to waste memory
     const zipFileStats = [];
     const parseZipFilePromises = zipFiles.map((file) => {
       const zipFile = this.getFile(file);
@@ -164,7 +164,7 @@ class ImportService {
     // init status object
     this.currentProgressingStatus = new CollectionProgressingStatus(collections);
 
-    // sequencial import
+    // process serially so as not to waste memory
     const promises = collections.map((collectionName) => {
       const importSettings = importSettingsMap[collectionName];
       return this.importCollection(collectionName, importSettings);