From 749900ca2d73dd1cbd9be7a0d6604d7311a32970 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Mon, 26 Mar 2018 16:40:35 +0200 Subject: [PATCH] Custom Ok Messages Added --- .vs/AAOlivia-Indicator-Bot/v15/.suo | Bin 31232 -> 29696 bytes Multi-Period-Daily/User.bot.js | 17 +++++++++++++++-- Multi-Period-Market/User.bot.js | 19 ++++++++++++++++--- 3 files changed, 31 insertions(+), 5 deletions(-) diff --git a/.vs/AAOlivia-Indicator-Bot/v15/.suo b/.vs/AAOlivia-Indicator-Bot/v15/.suo index ff884a21d864630fcf1aaf3c56c0e55a2cf27f9d..c6767da423540a2e7ab0f904a0135b169d981927 100644 GIT binary patch delta 272 zcmZqp!r1VFae{#?69W_oFfafS1Bn0c|Ns9WQRdALIpi59CQO;cl*9U=YFCWF=0c|5 z%&ZM%b7Dcve#T846QbIljEE%H^+J1U=+;+ znFa;zP}*hkg}CFBg?!&Jrf%|MWSYzrpeU9LQ^fFLKS-Sf5W8%cd@-(m@{RzH&HpnP h85aeyO=gUEzxjQRAmgSeQ!e~wZ~mXE%tVB-+yEv)O+^3z delta 333 zcmZp8!PxMHae{#?0}Kc-Fz^A{OhEka|Ns9WVaCl5Ipi59CQO;cl*3xEHPfDdb0O1j zW>y7Zxf^^yCOaeJy3LjB|Fsx5Y_2qV!^K!KIn8$Cq`*UyuiJ%9X37%U>}bEAiE9G~ z1A{QoIA(^)7o3hyPVhRmc)Bwake#{7O@(E0th3eTSg#w5q6r{7p`Z##*8{N&Sc{dw|EHK=#QGoE;}SM6BQZAx(gBQ+`S$RyBx0RYaFHmK3TUHh0 X getContextVariables -> Undefined Last File. -> reportKey = " + reportKey); - callBackFunction(global.DEFAULT_FAIL_RESPONSE); + logger.write("[HINT] start -> getContextVariables -> It is too early too run this process since the trade history of the market is not there yet."); + + let customOK = { + result: global.CUSTOM_OK_RESPONSE.result, + message: "Dependency does not exist." + } + logger.write("[WARN] start -> getContextVariables -> customOK = " + customOK.message); + callBackFunction(customOK); return; } @@ -125,7 +132,13 @@ Read the candles and volumes from Bruce and produce a file for each day and for if (thisReport.lastFile === undefined) { logger.write("[WARN] start -> getContextVariables -> Undefined Last File. -> reportKey = " + reportKey); - callBackFunction(global.DEFAULT_FAIL_RESPONSE); + + let customOK = { + result: global.CUSTOM_OK_RESPONSE.result, + message: "Dependency not ready." + } + logger.write("[WARN] start -> getContextVariables -> customOK = " + customOK.message); + callBackFunction(customOK); return; } diff --git a/Multi-Period-Market/User.bot.js b/Multi-Period-Market/User.bot.js index d2ebf01cb..a95b22128 100644 --- a/Multi-Period-Market/User.bot.js +++ b/Multi-Period-Market/User.bot.js @@ -112,8 +112,15 @@ Read the candles and volumes from Bruce and produce a single Index File for Mark thisReport = dependencies.statusReports.get(reportKey).file; if (thisReport.lastFile === undefined) { - logger.write("[ERROR] start -> getContextVariables -> Undefined Last File. -> reportKey = " + reportKey); - callBackFunction(global.DEFAULT_FAIL_RESPONSE); + logger.write("[WARN] start -> getContextVariables -> Undefined Last File. -> reportKey = " + reportKey); + logger.write("[HINT] start -> getContextVariables -> It is too early too run this process since the trade history of the market is not there yet."); + + let customOK = { + result: global.CUSTOM_OK_RESPONSE.result, + message: "Dependency does not exist." + } + logger.write("[WARN] start -> getContextVariables -> customOK = " + customOK.message); + callBackFunction(customOK); return; } @@ -125,7 +132,13 @@ Read the candles and volumes from Bruce and produce a single Index File for Mark if (thisReport.lastFile === undefined) { logger.write("[ERROR] start -> getContextVariables -> Undefined Last File. -> reportKey = " + reportKey); - callBackFunction(global.DEFAULT_FAIL_RESPONSE); + + let customOK = { + result: global.CUSTOM_OK_RESPONSE.result, + message: "Dependency not ready." + } + logger.write("[WARN] start -> getContextVariables -> customOK = " + customOK.message); + callBackFunction(customOK); return; }