Globals Module finally migrated to multi project

This commit is contained in:
Luis Fernando Molina committed 2020-11-28 10:19:01 +01:00
1 parent 4b97755328
commit fbe3b19aef
12 files changed
+12 -29

No files matched your search

@@ -37,7 +37,7 @@ exports.newSuperalgosFunctionLibrariesNodeJSFunctions = function () {
setTimeout(process.exit, 10000) // We will give 10 seconds to logs be written on file
function finalizeLoggers() {
global.LOGGER_MAP.forEach(forEachLogger)
TS.projects.superalgos.globals.taskVariables.LOGGER_MAP.forEach(forEachLogger)
function forEachLogger(logger) {
if (logger !== undefined) {
@@ -21,7 +21,7 @@ exports.newSuperalgosFunctionLibrariesSessionFunctions = function () {
}
function finalizeSessions () {
global.SESSION_MAP.forEach(forEachSession)
TS.projects.superalgos.globals.taskVariables.SESSION_MAP.forEach(forEachSession)
function forEachSession(session) {
global.EVENT_SERVER_CLIENT_MODULE.raiseEvent(session, 'Stopped')
@@ -4,7 +4,9 @@ exports.newSuperalgosGlobalsTaskVariables = function () {
we turn on this switch that will signal every internal procedure that it must stop.
*/
let thisObject = {
IS_TASK_STOPPING: false
IS_TASK_STOPPING: false,
LOGGER_MAP: new Map(), // We will put all the loggers in a map, so that we can eventually finalize them.
SESSION_MAP: new Map() // We will put all the sessions in a map, so that we can eventually finalize them.
}
return thisObject