Cloud refactored to Node

This commit is contained in:
Luis Fernando Molina committed 2019-03-25 12:31:13 +01:00
1 parent 66e4a286df
commit 50422852ae
7 files changed
+23 -23

No files matched your search

+1 -1
View File
@@ -163,7 +163,7 @@
return;
}
if (global.CURRENT_EXECUTION_AT === "Cloud") {
if (global.CURRENT_EXECUTION_AT === "Node") {
/* Only ERRORs go to the cloud console. */
+1 -1
View File
@@ -38,7 +38,7 @@
let accessToken
let keyId
let cloneId
if (global.CURRENT_EXECUTION_AT === "Cloud") {
if (global.CURRENT_EXECUTION_AT === "Node") {
keyId = process.env.KEY_ID
cloneId = process.env.CLONE_ID
+4 -4
View File
@@ -49,7 +49,7 @@
let filePath;
switch (global.CURRENT_EXECUTION_AT) { // This is what determines if the bot is loaded from the devTeam or an endUser copy.
case "Cloud": {
case "Node": {
if (global.RUN_AS_TEAM) {
filePath = global.DEV_TEAM + "/" + "bots" + "/" + bot.repo + "/" + pProcessConfig.name; // DevTeams bots only are run at the cloud.
} else {
@@ -85,7 +85,7 @@
USER_BOT_MODULE = pMODULE;
switch (global.CURRENT_EXECUTION_AT) {
case "Cloud": {
case "Node": {
filePath = global.DEV_TEAM + "/" + "bots" + "/" + bot.repo;
break;
}
@@ -664,7 +664,7 @@
function checkLoopHealth(pLastLoop) {
if (global.CURRENT_EXECUTION_AT !== "Cloud") {
if (global.CURRENT_EXECUTION_AT !== "Node") {
return;
}
@@ -717,7 +717,7 @@
let filePath;
switch (global.CURRENT_EXECUTION_AT) { // This is what determines if the bot is loaded from the devTeam or an endUser copy.
case "Cloud": {
case "Node": {
filePath = global.DEV_TEAM + "/" + "AACloud"; // DevTeams bots only are run at the cloud.
break;
}
+4 -4
View File
@@ -51,7 +51,7 @@
let filePath;
switch (global.CURRENT_EXECUTION_AT) { // This is what determines if the bot is loaded from the devTeam or an endUser copy.
case "Cloud": {
case "Node": {
if (global.RUN_AS_TEAM) {
filePath = global.DEV_TEAM + "/" + "bots" + "/" + bot.repo + "/" + pProcessConfig.name; // DevTeams bots only are run at the cloud.
} else {
@@ -88,7 +88,7 @@
USER_BOT_MODULE = pMODULE;
switch (global.CURRENT_EXECUTION_AT) {
case "Cloud": {
case "Node": {
filePath = global.DEV_TEAM + "/" + "bots" + "/" + bot.repo;
break;
}
@@ -898,7 +898,7 @@
function checkLoopHealth(pLastLoop) {
if (global.CURRENT_EXECUTION_AT !== "Cloud") {
if (global.CURRENT_EXECUTION_AT !== "Node") {
return;
}
@@ -951,7 +951,7 @@
let filePath;
switch (global.CURRENT_EXECUTION_AT) { // This is what determines if the bot is loaded from the devTeam or an endUser copy.
case "Cloud": {
case "Node": {
filePath = global.DEV_TEAM + "/" + "AACloud"; // DevTeams bots only are run at the cloud.
break;
}
+5 -5
View File
@@ -140,7 +140,7 @@
let filePath;
switch (global.CURRENT_EXECUTION_AT) {
case "Cloud": {
case "Node": {
filePath = global.DEV_TEAM + "/" + "AACloud"; // DevTeams bots only are run at the cloud.
break;
}
@@ -253,7 +253,7 @@
let filePath;
switch (global.CURRENT_EXECUTION_AT) {
case "Cloud": {
case "Node": {
filePath = global.DEV_TEAM + "/" + "bots" + "/" + listItem.repo; // DevTeams bots only are run at the cloud.
console.log(logDisplace + "Root : [INFO] start -> getBotConfig -> Getting Bot Config from the devTeams's Bot. ");
@@ -343,7 +343,7 @@
let processConfig = botConfig.processes[i];
switch (global.CURRENT_EXECUTION_AT) {
case "Cloud": {
case "Node": {
processConfig.startMode = global.EXECUTION_CONFIG.startMode // Override file storage configuration
if(global.EXECUTION_CONFIG.timePeriod){
processConfig.timePeriod = global.EXECUTION_CONFIG.timePeriod
@@ -819,7 +819,7 @@
let clonName = botConfig.codeName + "-" + "Clon" + clonKey;
clonName += ".1.0";
if (global.CURRENT_EXECUTION_AT === "Cloud") {
if (global.CURRENT_EXECUTION_AT === "Node") {
clonName += "-" + process.env.CLONE_ID;
}
@@ -843,7 +843,7 @@
let genes = {};
let clonName = botConfig.codeName;
if (global.CURRENT_EXECUTION_AT === "Cloud") {
if (global.CURRENT_EXECUTION_AT === "Node") {
clonName += "-" + process.env.CLONE_ID;
}
+1 -1
View File
@@ -1,7 +1,7 @@
require('dotenv').config()
global.CURRENT_ENVIRONMENT = "Develop";
global.CURRENT_EXECUTION_AT = "Cloud";
global.CURRENT_EXECUTION_AT = "Node";
global.SHALL_BOT_STOP = false;
global.AT_BREAKPOINT = false; // This is used only when running at the browser.
global.RUN_AS_TEAM = false;
+7 -7
View File
@@ -52,7 +52,7 @@
let filePath;
switch (global.CURRENT_EXECUTION_AT) { // This is what determines if the bot is loaded from the devTeam or an endUser copy.
case "Cloud": {
case "Node": {
if (global.RUN_AS_TEAM) {
filePath = global.DEV_TEAM + "/" + "bots" + "/" + bot.repo + "/" + pProcessConfig.name; // DevTeams bots only are run at the cloud.
} else {
@@ -94,7 +94,7 @@
USER_BOT_MODULE = pMODULE;
switch (global.CURRENT_EXECUTION_AT) {
case "Cloud": {
case "Node": {
filePath = global.DEV_TEAM + "/" + "bots" + "/" + bot.repo;
break;
}
@@ -284,7 +284,7 @@
}
if (global.CURRENT_EXECUTION_AT === "Cloud") {
if (global.CURRENT_EXECUTION_AT === "Node") {
if (bot.processDatetime.valueOf() > endDatetime.valueOf()) {
@@ -323,7 +323,7 @@
}
if (global.CURRENT_EXECUTION_AT === "Cloud") {
if (global.CURRENT_EXECUTION_AT === "Node") {
let beginDatetime = new Date(bot.competition.beginDatetime);
@@ -987,7 +987,7 @@
if (FULL_LOG === true) { logger.write(MODULE_NAME, "[INFO] run -> loop -> updateClonesModule -> Entering function."); }
if (global.CURRENT_EXECUTION_AT === "Cloud") {
if (global.CURRENT_EXECUTION_AT === "Node") {
// Update clones module with latest context informations
@@ -1079,7 +1079,7 @@
function checkLoopHealth(pLastLoop) {
if (global.CURRENT_EXECUTION_AT !== "Cloud") {
if (global.CURRENT_EXECUTION_AT !== "Node") {
return;
}
@@ -1134,7 +1134,7 @@
let filePath;
switch (global.CURRENT_EXECUTION_AT) { // This is what determines if the bot is loaded from the devTeam or an endUser copy.
case "Cloud": {
case "Node": {
filePath = global.DEV_TEAM + "/" + "AACloud"; // DevTeams bots only are run at the cloud.
break;
}