Skip to content
Snippets Groups Projects
Commit 9fe507fc authored by Mohamed, Fawzi Roberto (fawzi)'s avatar Mohamed, Fawzi Roberto (fawzi)
Browse files

improve configurability of watcher parameters

parent 8099d3fd
No related branches found
No related tags found
No related merge requests found
...@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment