Minor log changes
This commit is contained in:
parent
6d929237d2
commit
bbd70f2fea
|
@ -109,13 +109,11 @@ function areaFix() {
|
||||||
return callback(null, message);
|
return callback(null, message);
|
||||||
},
|
},
|
||||||
function persistMessage(message, callback) {
|
function persistMessage(message, callback) {
|
||||||
//
|
// :TODO: Persist message in private outgoing (sysop out box) (TBD: implementation)
|
||||||
// :TODO:
|
|
||||||
// - Persist message in private outgoing (sysop out box)
|
|
||||||
// - Make necessary changes such that the message is exported properly
|
|
||||||
//
|
|
||||||
console.log(message);
|
|
||||||
message.persist(err => {
|
message.persist(err => {
|
||||||
|
if(!err) {
|
||||||
|
console.log('AreaFix message persisted and will be exported as per configuration');
|
||||||
|
}
|
||||||
return callback(err);
|
return callback(err);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -2051,11 +2051,11 @@ FTNMessageScanTossModule.prototype.startup = function(cb) {
|
||||||
|
|
||||||
let self = this;
|
let self = this;
|
||||||
|
|
||||||
function tryImportNow(reasonDesc) {
|
function tryImportNow(reasonDesc, extraInfo) {
|
||||||
if(!importing) {
|
if(!importing) {
|
||||||
importing = true;
|
importing = true;
|
||||||
|
|
||||||
Log.info( { module : exports.moduleInfo.name }, reasonDesc);
|
Log.info( Object.assign({ module : exports.moduleInfo.name }, extraInfo), reasonDesc);
|
||||||
|
|
||||||
self.performImport( () => {
|
self.performImport( () => {
|
||||||
importing = false;
|
importing = false;
|
||||||
|
@ -2129,7 +2129,7 @@ FTNMessageScanTossModule.prototype.startup = function(cb) {
|
||||||
watcher.on(event, (fileName, fileRoot) => {
|
watcher.on(event, (fileName, fileRoot) => {
|
||||||
const eventPath = paths.join(fileRoot, fileName);
|
const eventPath = paths.join(fileRoot, fileName);
|
||||||
if(paths.join(fileRoot, fileName) === importSchedule.watchFile) {
|
if(paths.join(fileRoot, fileName) === importSchedule.watchFile) {
|
||||||
tryImportNow(`Performing import/toss due to @watch: ${eventPath} (${event})`);
|
tryImportNow('Performing import/toss due to @watch', { eventPath, event } );
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -2140,7 +2140,7 @@ FTNMessageScanTossModule.prototype.startup = function(cb) {
|
||||||
//
|
//
|
||||||
fse.exists(importSchedule.watchFile, exists => {
|
fse.exists(importSchedule.watchFile, exists => {
|
||||||
if(exists) {
|
if(exists) {
|
||||||
tryImportNow(`Performing import/toss due to @watch: ${importSchedule.watchFile} (initial exists)`);
|
tryImportNow('Performing import/toss due to @watch', { eventPath : importSchedule.watchFile, event : 'initial exists' } );
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue