diff --git a/app/filesWatcher.js b/app/filesWatcher.js index 21fed1464cb99be13a78f0a3ee93f95ad4b7e786..bbe91f718fbead2ec165b4c37239cd9ae767d38f 100644 --- a/app/filesWatcher.js +++ b/app/filesWatcher.js @@ -237,9 +237,9 @@ module.exports = function(config, models){ logger.info('starting watcher') var watcher = chokidar.watch(config.userInfo.basePathToWatch+ '/**/*.bkr', { - usePolling: true, // more expensive, but works also on GPFS with updates from multiple machines - interval: 1000, - binaryInterval: 3000 + usePolling: config.watcher.usePolling, // more expensive, but works also on GPFS with updates from multiple machines + interval: config.watcher.interval, + binaryInterval: config.watcher.binaryInterval }); watcher.on('add', (path,stats) => { addNewNotebook(path, stats) diff --git a/config/default.hjson b/config/default.hjson index 93920953f4c9865c8590152d861a2b15f796fc56..b6cae2efc95325daae4f64371cec9a0814fa0cb2 100644 --- a/config/default.hjson +++ b/config/default.hjson @@ -94,3 +94,8 @@ userInfo: { sharedDirInContainer: "/data/shared" mySharedDirInContainer: "/data/my-shared" } +watcher{ + usePolling: true + interval: 2000 + binaryInterval: 6000 +} \ No newline at end of file