Permalink
Browse files

Added option to tell chokidar to use long polling to overcome an issu…

…e with virtualbox not sending file system change events from the host machine.
  • Loading branch information...
diogogmt committed Sep 22, 2015
1 parent 2c449c5 commit f6291b4f09d3de815dbbc70bf9e26768ad1b8d46
Showing with 22 additions and 18 deletions.
  1. +20 −18 lib/forever-monitor/monitor.js
  2. +2 −0 lib/forever-monitor/plugins/watch.js
@@ -43,24 +43,26 @@ var Monitor = exports.Monitor = function (script, options) {
//
// Setup basic configuration options
//
options = options || {};
this.silent = options.silent || false;
this.killTree = options.killTree !== false;
this.uid = options.uid || utile.randomString(4);
this.id = options.id || false;
this.pidFile = options.pidFile;
this.max = options.max;
this.killTTL = options.killTTL;
this.killSignal = options.killSignal || 'SIGKILL';
this.childExists = false;
this.checkFile = options.checkFile !== false;
this.times = 0;
this.warn = console.error;
this.logFile = options.logFile;
this.outFile = options.outFile;
this.errFile = options.errFile;
this.append = options.append;
options = options || {};
this.silent = options.silent || false;
this.killTree = options.killTree !== false;
this.uid = options.uid || utile.randomString(4);
this.id = options.id || false;
this.pidFile = options.pidFile;
this.max = options.max;
this.killTTL = options.killTTL;
this.killSignal = options.killSignal || 'SIGKILL';
this.childExists = false;
this.checkFile = options.checkFile !== false;
this.times = 0;
this.warn = console.error;
this.logFile = options.logFile;
this.outFile = options.outFile;
this.errFile = options.errFile;
this.append = options.append;
this.usePolling = options.usePolling;
this.pollingInterval = options.pollingInterval;
//
// Define some safety checks for commands with spaces
@@ -63,6 +63,8 @@ exports.attach = function () {
});
var opts = {
usePolling: this.usePolling,
interval: this.pollingInterval,
ignoreInitial: true,
ignored: function(fileName) {
return !watchFilter.call(monitor, fileName);

0 comments on commit f6291b4

Please sign in to comment.