Merge in changes from 0.0.7-alpha branch for watchFiles
This commit is contained in:
commit
c652fb65ea
|
@ -13,6 +13,7 @@ const pty = require('ptyw.js');
|
||||||
const sane = require('sane');
|
const sane = require('sane');
|
||||||
const moment = require('moment');
|
const moment = require('moment');
|
||||||
const paths = require('path');
|
const paths = require('path');
|
||||||
|
const fse = require('fs-extra');
|
||||||
|
|
||||||
exports.getModule = EventSchedulerModule;
|
exports.getModule = EventSchedulerModule;
|
||||||
exports.EventSchedulerModule = EventSchedulerModule; // allow for loadAndStart
|
exports.EventSchedulerModule = EventSchedulerModule; // allow for loadAndStart
|
||||||
|
@ -245,6 +246,12 @@ EventSchedulerModule.prototype.startup = function(cb) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
fse.exists(schedEvent.schedule.watchFile, exists => {
|
||||||
|
if(exists) {
|
||||||
|
self.performAction(schedEvent, `Watch file: ${schedEvent.schedule.watchFile}`);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -1698,6 +1698,16 @@ FTNMessageScanTossModule.prototype.startup = function(cb) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//
|
||||||
|
// If the watch file already exists, kick off now
|
||||||
|
// https://github.com/NuSkooler/enigma-bbs/issues/122
|
||||||
|
//
|
||||||
|
fse.exists(importSchedule.watchFile, exists => {
|
||||||
|
if(exists) {
|
||||||
|
tryImportNow(`Performing import/toss due to @watch: ${importSchedule.watchFile} (initial exists)`);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue