TODO notes

This commit is contained in:
Bryan Ashby 2019-01-02 20:07:46 -07:00
parent b23cdd20bf
commit eaace9a81d
1 changed files with 4 additions and 2 deletions

View File

@ -1677,7 +1677,7 @@ function FTNMessageScanTossModule() {
localAreaTags : self.getLocalAreaTagsForTic(), localAreaTags : self.getLocalAreaTagsForTic(),
}; };
return ticFileInfo.validate(config, (err, localInfo) => { ticFileInfo.validate(config, (err, localInfo) => {
if(err) { if(err) {
Log.trace( { reason : err.message }, 'Validation failure'); Log.trace( { reason : err.message }, 'Validation failure');
return callback(err); return callback(err);
@ -1893,7 +1893,7 @@ function FTNMessageScanTossModule() {
], ],
(err, localInfo) => { (err, localInfo) => {
if(err) { if(err) {
Log.error( { error : err.message, reason : err.reason, tic : ticFileInfo.filePath }, 'Failed import/update TIC record' ); Log.error( { error : err.message, reason : err.reason, tic : ticFileInfo.filePath }, 'Failed to import/update TIC' );
} else { } else {
Log.info( Log.info(
{ tic : ticFileInfo.path, file : ticFileInfo.filePath, area : localInfo.areaTag }, { tic : ticFileInfo.path, file : ticFileInfo.filePath, area : localInfo.areaTag },
@ -2109,6 +2109,8 @@ FTNMessageScanTossModule.prototype.processTicFilesInDirectory = function(importD
async.eachSeries(ticFilesInfo, (ticFileInfo, nextTicInfo) => { async.eachSeries(ticFilesInfo, (ticFileInfo, nextTicInfo) => {
self.processSingleTicFile(ticFileInfo, err => { self.processSingleTicFile(ticFileInfo, err => {
if(err) { if(err) {
// :TODO: If ENOENT -OR- failed due to CRC mismatch: create a pending state & try again later; the "attached" file may not yet be ready.
// archive rejected TIC stuff (.TIC + attach) // archive rejected TIC stuff (.TIC + attach)
async.each( [ ticFileInfo.path, ticFileInfo.filePath ], (path, nextPath) => { async.each( [ ticFileInfo.path, ticFileInfo.filePath ], (path, nextPath) => {
if(!path) { // possibly rejected due to "File" not existing/etc. if(!path) { // possibly rejected due to "File" not existing/etc.