Browser Execution type removed

This commit is contained in:
Luis Fernando Molina committed 2019-03-25 14:34:35 +01:00
1 parent 50422852ae
commit 9a277ddd72
6 files changed
+33 -257

No files matched your search

+5 -50
View File
@@ -61,16 +61,12 @@
break;
}
case "Browser": {
filePath = global.DEV_TEAM + "/" + "members" + "/" + global.USER_LOGGED_IN + "/" + global.CURRENT_BOT_REPO + "/" + pProcessConfig.name; // DevTeam Members bots only are run at the browser.
break;
}
case "IDE": {
filePath = global.DEV_TEAM + "/" + "bots" + "/" + bot.repo + "/" + pProcessConfig.name; // This works like Cloud except of a few things.
break;
}
default: {
parentLogger.write(MODULE_NAME, "[ERROR] initialize -> onInizialized -> CURRENT_EXECUTION_AT must be either 'Cloud' or 'Browser'.");
parentLogger.write(MODULE_NAME, "[ERROR] initialize -> onInizialized -> CURRENT_EXECUTION_AT must be either 'Node' or 'IDE'.");
parentLogger.write(MODULE_NAME, "[ERROR] initialize -> onInizialized -> global.CURRENT_EXECUTION_AT = " + global.CURRENT_EXECUTION_AT);
callBackFunction(global.DEFAULT_FAIL_RESPONSE);
return;
@@ -93,23 +89,8 @@
USER_BOT_MODULE = pMODULE;
switch (global.CURRENT_EXECUTION_AT) {
case "Node": {
filePath = global.DEV_TEAM + "/" + "bots" + "/" + bot.repo;
break;
}
case "Browser": {
filePath = global.DEV_TEAM + "/" + "members" + "/" + global.USER_LOGGED_IN + "/" + global.CURRENT_BOT_REPO;
break;
}
default: {
parentLogger.write(MODULE_NAME, "[ERROR] initialize -> onInizialized -> onBotDownloaded -> CURRENT_EXECUTION_AT must be either 'Cloud' or 'Browser'.");
parentLogger.write(MODULE_NAME, "[ERROR] initialize -> onInizialized -> onBotDownloaded -> global.CURRENT_EXECUTION_AT = " + global.CURRENT_EXECUTION_AT);
callBackFunction(global.DEFAULT_FAIL_RESPONSE);
return;
}
}
filePath = global.DEV_TEAM + "/" + "bots" + "/" + bot.repo;
cloudRequire.downloadCommons(cloudStorage, filePath, onCommonsDownloaded);
function onCommonsDownloaded(err, pMODULE) {
@@ -1131,34 +1112,8 @@
if (err.result === global.DEFAULT_OK_RESPONSE.result) {
let filePath;
switch (global.CURRENT_EXECUTION_AT) { // This is what determines if the bot is loaded from the devTeam or an endUser copy.
case "Node": {
filePath = global.DEV_TEAM + "/" + "AACloud"; // DevTeams bots only are run at the cloud.
break;
}
case "Browser": {
if (global.SHALL_BOT_STOP === false) {
continueCallBack();
} else {
stopCallBack();
}
return;
}
default: {
logger.write(MODULE_NAME, "[ERROR] run -> loop -> shallWeStop -> onInizialized -> CURRENT_EXECUTION_AT must be either 'Cloud' or 'Browser'.");
logger.write(MODULE_NAME, "[ERROR] run -> loop -> shallWeStop -> onInizialized -> global.CURRENT_EXECUTION_AT = " + global.CURRENT_EXECUTION_AT);
logger.persist();
clearInterval(fixedTimeLoopIntervalHandle);
clearTimeout(nextLoopTimeoutHandle);
clearTimeout(checkLoopHealthHandle);
bot.enableCheckLoopHealth = false;
callBackFunction(global.DEFAULT_FAIL_RESPONSE);
return;
}
}
let filePath = global.DEV_TEAM + "/" + "AACloud"; // DevTeams bots only are run at the cloud.
let fileName = "this.config.json";
cloudStorage.getTextFile(filePath, fileName, onFileReceived);