global.ROOT_DIR

This commit is contained in:
Luis Fernando Molina committed 2020-06-12 09:22:08 +02:00
1 parent ef254e056e
commit 7c279e46dc
7 files changed
+63 -76

No files matched your search

+6 -8
View File
@@ -1,7 +1,5 @@
exports.newSensorBot = function newSensorBot(bot, parentLogger) {
const ROOT_DIR = './';
const MODULE_NAME = "Sensor Bot";
const FULL_LOG = true;
@@ -11,7 +9,7 @@
const FILE_STORAGE = require('./FileStorage.js');
let fileStorage = FILE_STORAGE.newFileStorage(parentLogger);
const DEBUG_MODULE = require(ROOT_DIR + 'DebugLog');
const DEBUG_MODULE = require(global.ROOT_DIR + 'DebugLog');
let logger; // We need this here in order for the loopHealth function to work and be able to rescue the loop when it gets in trouble.
let nextLoopTimeoutHandle;
@@ -124,11 +122,11 @@
processHeartBeat()
/* We define here all the modules that the rest of the infraestructure, including the bots themselves can consume. */
const UTILITIES = require(ROOT_DIR + 'CloudUtilities');
const STATUS_REPORT = require(ROOT_DIR + 'StatusReport');
const STATUS_DEPENDENCIES = require(ROOT_DIR + 'StatusDependencies');
const PROCESS_EXECUTION_EVENTS = require(ROOT_DIR + 'ProcessExecutionEvents');
const PROCESS_OUTPUT = require(ROOT_DIR + 'ProcessOutput');
const UTILITIES = require(global.ROOT_DIR + 'CloudUtilities');
const STATUS_REPORT = require(global.ROOT_DIR + 'StatusReport');
const STATUS_DEPENDENCIES = require(global.ROOT_DIR + 'StatusDependencies');
const PROCESS_EXECUTION_EVENTS = require(global.ROOT_DIR + 'ProcessExecutionEvents');
const PROCESS_OUTPUT = require(global.ROOT_DIR + 'ProcessOutput');
/* We define the datetime for the process that we are running now. This will be the official processing time for both the infraestructure and the bot. */
bot.processDatetime = new Date(); // This will be considered the process date and time, so as to have it consistenly all over the execution.