improve configurability of watcher parameters

parent 8099d3fd
...@@ -237,9 +237,9 @@ module.exports = function(config, models){ ...@@ -237,9 +237,9 @@ module.exports = function(config, models){
logger.info('starting watcher') logger.info('starting watcher')
var watcher = chokidar.watch(config.userInfo.basePathToWatch+ '/**/*.bkr', { var watcher = chokidar.watch(config.userInfo.basePathToWatch+ '/**/*.bkr', {
usePolling: true, // more expensive, but works also on GPFS with updates from multiple machines usePolling: config.watcher.usePolling, // more expensive, but works also on GPFS with updates from multiple machines
interval: 1000, interval: config.watcher.interval,
binaryInterval: 3000 binaryInterval: config.watcher.binaryInterval
}); });
watcher.on('add', (path,stats) => { watcher.on('add', (path,stats) => {
addNewNotebook(path, stats) addNewNotebook(path, stats)
......
...@@ -94,3 +94,8 @@ userInfo: { ...@@ -94,3 +94,8 @@ userInfo: {
sharedDirInContainer: "/data/shared" sharedDirInContainer: "/data/shared"
mySharedDirInContainer: "/data/my-shared" mySharedDirInContainer: "/data/my-shared"
} }
watcher{
usePolling: true
interval: 2000
binaryInterval: 6000
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment