From 09a400c15fa6c72d1613291e6703fb3e0ac24fa0 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Tue, 24 Sep 2019 22:34:54 +0200 Subject: [PATCH] Clear logs for all --- CockpitSpace/RestartSimulation.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/CockpitSpace/RestartSimulation.js b/CockpitSpace/RestartSimulation.js index aa2cb36e9..c1089f3fc 100644 --- a/CockpitSpace/RestartSimulation.js +++ b/CockpitSpace/RestartSimulation.js @@ -115,15 +115,15 @@ function newRestartSimulation () { thisObject.status = 'Error' counterTillNextState = 500 } else { - if (idleLabel === 'START LIVE TRADING') { - callServer('', 'ResetLogsAndData', onSaved) - function onSaved (err) { - if (err.result === GLOBAL.DEFAULT_OK_RESPONSE.result) { - logger.write('[INFO] Restart Simulation -> Logs and Simulation data Deleted.') - } else { - logger.write('[ERROR] Restart Simulation -> Can not delete Logs and Simulation data. err = ' + err.messsage) - } + callServer('', 'ResetLogsAndData', onSaved) + function onSaved (err) { + if (err.result === GLOBAL.DEFAULT_OK_RESPONSE.result) { + logger.write('[INFO] Restart Simulation -> Logs and Simulation data Deleted.') + } else { + logger.write('[ERROR] Restart Simulation -> Can not delete Logs and Simulation data. err = ' + err.messsage) } + } + if (idleLabel === 'START LIVE TRADING') { let event = { definition: getDefinition() }