From fa6a5b4d625d7fb5195f7f24140d779cb6c18003 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Fri, 23 Mar 2018 14:45:24 +0100 Subject: [PATCH] Bug on write Status Report fixed --- .vs/AABruce-Indicator-Bot/v15/.suo | Bin 25088 -> 25088 bytes One-Min-Daily-Candles-Volumes/User.bot.js | 15 +++++++++++---- this.bot.config.json | 4 ++-- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/.vs/AABruce-Indicator-Bot/v15/.suo b/.vs/AABruce-Indicator-Bot/v15/.suo index a68a558fe41aef90ea9004a0f8e838ae64afa25a..bec919de578c4bd47c6d79b5f84256835c05c34e 100644 GIT binary patch delta 1194 zcmcgs&rcIk5Z?FN;==Aqf%2mZO0gA*wAfmx;7M(PwzL#ACYoq0+LCxF(JavzBN&W{ z2^Ty51)NDNyp!lbr3du@F@~FWPaZUI=mniA-3T_GOq}G)dv9jm%=czycdp3himZ^} zOo1-mSz9=J{^ioU&#VJx_$*7pHeZLengAPtZObvOU6Q1q6={HFrRhp5YU&Y96^jE` zy|Ujy&o6qR6;vh-L(_FxgUugB2gzH;PNL;Lu-ZcaEYuiijcNh%rP0 zu>)_FAY>Ff81*iAuDpP-J-~)xMxA95*j6vf9`vGM@X6_6VVKcUD!r0aB%~HwnuGmQ znsKchkRE9UrCbf`8ngbH%xIioDm8?PYkI?0(_@~qi2IH>Q>nN$dyKZ@c;HZS#x+J4 zEPHHV=qXrh4u~yXWqCbZ?I8?(gJ}{Ko!V|@6h_AaTj`E)l~_}ge_PrX82oT~gva&8 zl5dI1WFaXRtIXdV7E^1Z>9UHFZ-dF^(2=+82I^O#)E?hu(6KKMGRSvFs)`|u?gh5! z<#|s;r8%i0x9GR7^u1^D-uIZ9dgHLh1H$lPY{xybrcku_cgrYBr$)8f9M+I{GKdYo zhRu-=7A8d?KKu$Y31e}P!}n`r;7*1^)CW^29nCBijCw$l^~G|TTQ?_-={vr2)5g_Q zj4vXSr+j&XJ}pVgM+f0eu%~s(H;|p23J&#Wv%%0%pWhz{^@kovFq?j~a{7$& wcU~fcKZF0oMj#sos$0gH;br<@Px|fp(~oz@V}#ki~|XkmbS{bib7DM;NW6X5_M1#*{n;? zq!ZxgWO_GEY)l&iF)1;w4sJSXLWd>>{oj6=4o1V^O@6s2=bU@a|DAi^T9($b^fD&M z%&nrux{>~NYJl(99??AKMUFGWeKgH^bH_-%$z=LjUPjrj!CqIk4^_n*VDBSW$KD7$ zfEOHBjeZ!FB2M|%GDJxcL+i~Uzh&V^Ty>u2jJb~%Rd<72$Zsp3;i;B@(qiu#RQ*+L zRZ8`7z*agmpmaEaiYXmxSF2XeIi%NzUstj*8e~V1ifOk5jb{I=GmIKZ@ZV ztpg%l#xgXlfLld*o7zYEtB9OovLI7UO-)FNlkvJq(!KEbs=U1CSr=nAdA~kFoNes2 zoYoR thisDatetime.getUTCMonth() + 1) || year > thisDatetime.getUTCFullYear()) { - logger.write("[ERROR] start -> writeStatusReport -> We are too far in the future. Bot will not execute now."); + logger.write("[ERROR] start -> We are too far in the future. Bot will not execute now."); let customOK = { result: global.CUSTOM_OK_RESPONSE.result, @@ -375,6 +375,7 @@ if (err.result !== global.DEFAULT_OK_RESPONSE.result) { logger.write("[ERROR] start -> findPreviousContent -> getVolumes -> onFileReceived -> err = " + err.message); + logger.write("[ERROR] start -> findPreviousContent -> getVolumes -> onFileReceived -> text = " + text); callBackFunction(err); return; } @@ -392,6 +393,7 @@ logger.write("[ERROR] start -> findPreviousContent -> getVolumes -> onFileReceived -> err = " + err.message); logger.write("[ERROR] start -> findPreviousContent -> getVolumes -> onFileReceived -> filePath = " + filePath); + logger.write("[ERROR] start -> findPreviousContent -> getVolumes -> onFileReceived -> text = " + text); logger.write("[HINT] start -> findPreviousContent -> getVolumes -> onFileReceived -> Empty or corrupt volume file found."); callBackFunction(global.DEFAULT_FAIL_RESPONSE); return; @@ -470,6 +472,7 @@ if (err.result !== global.DEFAULT_OK_RESPONSE.result) { logger.write("[ERROR] start -> findLastCandleCloseValue -> loopStart -> onFileReceived -> err = " + err.message); + logger.write("[ERROR] start -> findLastCandleCloseValue -> loopStart -> onFileReceived -> text = " + text); callBackFunction(err); return; } @@ -500,6 +503,7 @@ logger.write("[ERROR] start -> findLastCandleCloseValue -> loopStart -> onFileReceived -> err = " + err.message); logger.write("[ERROR] start -> findLastCandleCloseValue -> loopStart -> onFileReceived -> filePath = " + filePath); + logger.write("[ERROR] start -> findLastCandleCloseValue -> loopStart -> onFileReceived -> text = " + text); logger.write("[HINT] start -> findLastCandleCloseValue -> loopStart -> onFileReceived -> Empty or corrupt volume file found."); callBackFunction(global.DEFAULT_FAIL_RESPONSE); return; @@ -695,6 +699,7 @@ if (err.result !== global.DEFAULT_OK_RESPONSE.result) { logger.write("[ERROR] start -> buildCandles -> nextCandleFile -> readTrades -> onFileReceived -> err = " + err.message); + logger.write("[ERROR] start -> buildCandles -> nextCandleFile -> readTrades -> onFileReceived -> text = " + text); callBackFunction(err); return; } @@ -772,7 +777,9 @@ logger.write("[ERROR] start -> buildCandles -> nextCandleFile -> readTrades -> onFileReceived -> err = " + err.message); logger.write("[ERROR] start -> buildCandles -> nextCandleFile -> readTrades -> onFileReceived -> filePath = " + filePath); + logger.write("[ERROR] start -> buildCandles -> nextCandleFile -> readTrades -> onFileReceived -> text = " + text); logger.write("[HINT] start -> buildCandles -> nextCandleFile -> readTrades -> onFileReceived -> Empty or corrupt volume file found."); + callBackFunction(global.DEFAULT_FAIL_RESPONSE); return; } @@ -968,7 +975,7 @@ function onStatusReportWritten(err) { try { - if (FULL_LOG === true) { logger.write("[INFO] start -> writeFiles -> onStatusReportWritten -> Entering function."); } + if (FULL_LOG === true) { logger.write("[INFO] start -> writeFiles -> writeReport -> onStatusReportWritten -> Entering function."); } if (err.result !== global.DEFAULT_OK_RESPONSE.result) { logger.write("[ERROR] start -> writeFiles -> onStatusReportWritten -> err = " + err.message); @@ -979,7 +986,7 @@ callBack(); return; } catch (err) { - logger.write("[ERROR] start -> writeFiles -> onStatusReportWritten -> err = " + err.message); + logger.write("[ERROR] start -> writeFiles -> writeReport -> onStatusReportWritten -> err = " + err.message); callBackFunction(global.DEFAULT_FAIL_RESPONSE); return; } @@ -1023,7 +1030,7 @@ fileComplete: isFileComplete }; - let fileContent = JSON.stringify(report); + let fileContent = JSON.stringify(statusReport); statusReport.save(onSaved); diff --git a/this.bot.config.json b/this.bot.config.json index eccb0cd9a..2e1dea6d3 100644 --- a/this.bot.config.json +++ b/this.bot.config.json @@ -21,8 +21,8 @@ }, "oneMonth": { "run": "true", - "year": "2018", - "month": "2" + "year": "2015", + "month": "5" }, "noTime": { "run": "false"