Переглянути джерело

Мелкий рефакторинг

Book Pauk 5 роки тому
батько
коміт
5647e8219d
1 змінених файлів з 4 додано та 2 видалено
  1. 4 2
      server/core/Reader/ReaderWorker.js

+ 4 - 2
server/core/Reader/ReaderWorker.js

@@ -10,6 +10,8 @@ const RemoteWebDavStorage = require('../RemoteWebDavStorage');
 const utils = require('../utils');
 const utils = require('../utils');
 const log = new (require('../AppLogger'))().log;//singleton
 const log = new (require('../AppLogger'))().log;//singleton
 
 
+const cleanDirPeriod = 60*60*1000;//1 раз в час
+
 let instance = null;
 let instance = null;
 
 
 //singleton
 //singleton
@@ -36,8 +38,8 @@ class ReaderWorker {
                 );
                 );
             }
             }
 
 
-            this.periodicCleanDir(this.config.tempPublicDir, this.config.maxTempPublicDirSize, 60*60*1000);//1 раз в час
-            this.periodicCleanDir(this.config.uploadDir, this.config.maxUploadPublicDirSize, 60*60*1000);//1 раз в час
+            this.periodicCleanDir(this.config.tempPublicDir, this.config.maxTempPublicDirSize, cleanDirPeriod);
+            this.periodicCleanDir(this.config.uploadDir, this.config.maxUploadPublicDirSize, cleanDirPeriod);
             
             
             instance = this;
             instance = this;
         }
         }