diff --git a/.vs/AACloud/v15/.suo b/.vs/AACloud/v15/.suo index 03ebdec95..45a534d97 100644 Binary files a/.vs/AACloud/v15/.suo and b/.vs/AACloud/v15/.suo differ diff --git a/Debug Log.js b/Debug Log.js index 29b9f42d9..5720bf635 100644 --- a/Debug Log.js +++ b/Debug Log.js @@ -78,6 +78,21 @@ folderToRemove = '../Logs/' + thisObject.bot.devTeam + "/" + thisObject.bot.type + "/" + thisObject.bot.codeName + "." + thisObject.bot.version.major + "." + thisObject.bot.version.minor + "/" + thisObject.bot.process + "/Loop." + (loopCounter - global.PLATFORM_CONFIG.maxLogLoops).toString(); rimraf.sync(folderToRemove); + + if (thisObject.bot.debug.year !== undefined) { + + folderPath = '../Logs/' + thisObject.bot.devTeam + "/" + thisObject.bot.type + "/" + thisObject.bot.codeName + "." + thisObject.bot.version.major + "." + thisObject.bot.version.minor + "/" + thisObject.bot.process + "/Loop." + loopCounter + "/" + thisObject.bot.debug.year; + + createFolderSync(folderPath); + + if (thisObject.bot.debug.month !== undefined) { + + folderPath = '../Logs/' + thisObject.bot.devTeam + "/" + thisObject.bot.type + "/" + thisObject.bot.codeName + "." + thisObject.bot.version.major + "." + thisObject.bot.version.minor + "/" + thisObject.bot.process + "/Loop." + loopCounter + "/" + thisObject.bot.debug.year + "/" + thisObject.bot.debug.month; + + createFolderSync(folderPath); + + } + } } catch (err) { console.log("Error trying to create the loop folder needed or deleting old ones. Error: " + err.message); diff --git a/Run.js b/Run.js index a880348a7..11924c8c1 100644 --- a/Run.js +++ b/Run.js @@ -159,6 +159,7 @@ for (let p = 0; p < global.PLATFORM_CONFIG.executionList.length; p++) { } botConfig.process = listItem.process; + botConfig.debug = {}; logger = DEBUG_MODULE.newDebugLog(); logger.fileName = MODULE_NAME; @@ -200,10 +201,15 @@ for (let p = 0; p < global.PLATFORM_CONFIG.executionList.length; p++) { if (FULL_LOG === true) { logger.write("[INFO] run -> allMonths start mode detected. "); } - for (let year = processConfig.startMode.allMonths.maxYear; year > processConfig.startMode.allMonths.minYear; year--) { + for (let year = processConfig.startMode.allMonths.maxYear; year >= processConfig.startMode.allMonths.minYear; year--) { for (let month = 12; month > 0; month--) { + botConfig.debug = { + month: pad(month, 2), + year: pad(year, 4) + }; + let timeDelay = Math.random() * 10 * 1000; // We introduce a short delay so as to not overload the machine. setTimeout(startProcess, timeDelay); @@ -242,6 +248,11 @@ for (let p = 0; p < global.PLATFORM_CONFIG.executionList.length; p++) { let month = pad(processConfig.startMode.oneMonth.month, 2); let year = processConfig.startMode.oneMonth.year; + botConfig.debug = { + month: pad(month, 2), + year: pad(year, 4) + }; + switch (botConfig.type) { case 'Extraction': { runExtractionBot(processConfig, month, year);