From af883be0fff8c9c4bbdfabe401cf1fca63135348 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Fri, 30 Mar 2018 17:29:55 +0200 Subject: [PATCH] RETRY loop BUG when status report is corrupt --- .vs/AACharly-Extraction-Bot/v15/.suo | Bin 31232 -> 29696 bytes Poloniex-Hole-Fixing/User.bot.js | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/.vs/AACharly-Extraction-Bot/v15/.suo b/.vs/AACharly-Extraction-Bot/v15/.suo index 1ca7db7e3c160f4e16dc2718fb8404e1776f13ec..a7838b1dc15d2b1fb41f7886c475e8646083b897 100644 GIT binary patch delta 1826 zcmdT_OH30{6n$?P=vb$vluwJ4ekdRcm4Z_OsMt6xYOoYzL_rcY!9POO)_-EvjfpOB zuF;(_ure_wIvZkQY=R4Sem5q@-%1lVCdJP}>%CK|)x@9+7ryE3d+*$L&b@QzcA8A{ zy0Vq{>Sv(eU++aW-w;hLoI#h96&>t6FqERIVvi{F=4)xtPZNYv0c zSy#(PAYnbh_rQ!bCR2(1`Oe*tD2~bbsRD8!T^yT3iApQatt96jCLU$l0@cFlS>#G& z#EQG_gWAvn@#;RAit9$pB`;G+h(Y5!oxC*Wq(d4t?MTg@&oX!?B;4yH-z=QHUw4uR zA>rw@7+qMD=PPW+jR2pkd;Ur(CR5B@15%KjkmHU-MKK;{N_4?9r(^)sbnwnO1xlGs z9Hq@vWkjn`C)Fkns^hli?Urj1HldMr_U^qg3#XkYA5GW9K=p;-u>Xv}@Z6TOhS^^*R%*(6MKidsEt=XqtrizjIO zabP0l2cEwHfk!04n4Vc7iF_EORXV>8eCZ81t**oOB6wQ6^lz4%g1N8OPDbUoMuwc%;TX#tyI{ zwhG;GT>W}Pf6yP~6UzlXyg$Vu6%XI+GX1v&(h?~>)mp?$9v*7nv-il8;qr|w9UpAt Yw;29KR9Tf!Kxu7n4|KE*Zx4jN0l(IQlmGw# delta 2402 zcma)7ZERCz6u$3m%gVf6w{{<0SGMj;zS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_kpKVy diff --git a/Poloniex-Hole-Fixing/User.bot.js b/Poloniex-Hole-Fixing/User.bot.js index f09b4e671..b21786f3a 100644 --- a/Poloniex-Hole-Fixing/User.bot.js +++ b/Poloniex-Hole-Fixing/User.bot.js @@ -188,6 +188,13 @@ What is the lastFile pointer? reportKey = "AAMasters" + "-" + "AACharly" + "-" + "Poloniex-Live-Trades" + "-" + "dataSet.V1"; if (FULL_LOG === true) { logger.write("[INFO] start -> getContextVariables -> reportKey = " + reportKey); } + + if (dependencies.statusReports.get(reportKey).status === "Status Report is corrupt.") { + logger.write("[ERROR] start -> getContextVariables -> Can not continue because dependecy Status Report is corrupt. "); + callBackFunction(global.DEFAULT_RETRY_RESPONSE); + return; + } + thisReport = dependencies.statusReports.get(reportKey).file; if (thisReport.lastFile === undefined) { @@ -206,6 +213,13 @@ What is the lastFile pointer? reportKey = "AAMasters" + "-" + "AACharly" + "-" + "Poloniex-Historic-Trades" + "-" + "dataSet.V1"; if (FULL_LOG === true) { logger.write("[INFO] start -> getContextVariables -> reportKey = " + reportKey); } + + if (dependencies.statusReports.get(reportKey).status === "Status Report is corrupt.") { + logger.write("[ERROR] start -> getContextVariables -> Can not continue because dependecy Status Report is corrupt. "); + callBackFunction(global.DEFAULT_RETRY_RESPONSE); + return; + } + thisReport = dependencies.statusReports.get(reportKey).file; if (thisReport.lastFile === undefined) { @@ -256,6 +270,13 @@ What is the lastFile pointer? reportKey = "AAMasters" + "-" + "AACharly" + "-" + "Poloniex-Hole-Fixing" + "-" + "dataSet.V1" + "-" + year + "-" + month; if (FULL_LOG === true) { logger.write("[INFO] start -> getContextVariables -> reportKey = " + reportKey); } + + if (dependencies.statusReports.get(reportKey).status === "Status Report is corrupt.") { + logger.write("[ERROR] start -> getContextVariables -> Can not continue because self dependecy Status Report is corrupt. Aborting Process."); + callBackFunction(global.DEFAULT_FAIL_RESPONSE); + return; + } + holeFixingStatusReport = dependencies.statusReports.get(reportKey).file; if (holeFixingStatusReport.lastFile === undefined) {