From 1205ef191559c9cb4d894bd8467a17f015f2e538 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sat, 10 Aug 2019 19:14:45 +0200 Subject: [PATCH] Restarting Clone Executor --- CockpitSpace/RestartSimulation.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/CockpitSpace/RestartSimulation.js b/CockpitSpace/RestartSimulation.js index 4d5787271..cadf976f1 100644 --- a/CockpitSpace/RestartSimulation.js +++ b/CockpitSpace/RestartSimulation.js @@ -1,6 +1,8 @@ function newRestartSimulation () { const MODULE_NAME = 'Restart Simulation' + const logger = newWebDebugLog() + logger.fileName = MODULE_NAME let thisObject = { visible: true, @@ -113,7 +115,16 @@ function newRestartSimulation () { thisObject.status = 'Saving' let result = await canvas.strategySpace.strategizerGateway.saveToStrategyzer(simulationParams) if (result === true) { - if (window.canvasApp.executingAt !== 'Local') { + if (window.canvasApp.executingAt === 'Local') { + callServer('', 'RestartCloneExecutor', onSaved) + function onSaved (err) { + if (err.result === GLOBAL.DEFAULT_OK_RESPONSE.result) { + logger.write('[INFO] Restart Simulation -> Clone Executor Restarted') + } else { + logger.write('[ERROR] Restart Simulation -> Can not restart Clone Executor. err = ' + err.messsage) + } + } + } else { thisObject.status = 'Restarting' await graphQlRestartSimulation(simulationParams) }