node-red-contrib-airship-comtrex-sftp
Advanced tools
Comparing version 1.0.0--beta.5 to 1.0.0--beta.6
@@ -42,3 +42,3 @@ const SFTPClient = require('ssh2-sftp-client'); | ||
let csvFiles = fileList.filter(f => f.name.endsWith('.csv')); | ||
console.log(csvFiles) | ||
let localFiles = [] | ||
@@ -56,11 +56,15 @@ for (let file of csvFiles) { | ||
// send individual messages for each file | ||
node.send([msg, null]); // Sends msg out of the first output | ||
} else { | ||
node.warn("Skipping file with future modify time: " + file.name); | ||
node.send([null, msg]); // Sends msg out of the second output | ||
localFiles.push(localPath); | ||
} | ||
} | ||
if (localFiles.length > 0) { | ||
// send individual messages for each file | ||
node.send([msg, null]); // Sends msg out of the first output | ||
} else { | ||
node.warn("Skipping file with future modify time: " + file.name); | ||
node.send([null, msg]); // Sends msg out of the second output | ||
} | ||
// Delete files older than 30 days from the remote processed folder | ||
@@ -67,0 +71,0 @@ await deleteOldFiles(sftp, processedDirectory, this.deleteAfterDays); |
{ | ||
"name": "node-red-contrib-airship-comtrex-sftp", | ||
"version": "1.0.0--beta.5", | ||
"version": "1.0.0--beta.6", | ||
"description": "comtrex-airship sftp functions", | ||
@@ -5,0 +5,0 @@ "main": "comtrex_sftp.js", |
6518
90