From 6f32c75be5af3a32c0bf93487a8f467ab5f103b4 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Fri, 13 Apr 2018 20:48:04 +0200 Subject: [PATCH] BLOBs Realease --- .vs/AAOlivia-Indicator-Bot/v15/.suo | Bin 28160 -> 32256 bytes Commons.js | 6 +++--- Multi-Period-Daily/User.bot.js | 20 ++++++++++---------- Multi-Period-Market/User.bot.js | 24 ++++++++++++------------ 4 files changed, 25 insertions(+), 25 deletions(-) diff --git a/.vs/AAOlivia-Indicator-Bot/v15/.suo b/.vs/AAOlivia-Indicator-Bot/v15/.suo index dd2c232afc6bb4e8a86045b870177056a994aa81..782f96eaf9a00643284c2bc6a88f36436477f78d 100644 GIT binary patch delta 2141 zcmdT^?N3`(7(eIs7VgSvEu*xT@m8VK4roO{OT>gZNs1)1OomJB z=IaJC8&C`B-Vk8661tKo0OHD2Zm1b;TwdiP&dfJNhwE+utOr zZ01gkt-)BX(%`{bjKJ0mlW}ZARGGLIoK#BHlurL!3t}*=}%6r1>;ViG+9vnPOcy<*8qp* z$esnaq;)TsPiBs_)?=)!uX}(y$8dNI@f_kf0^X@pWjaytX`L5Rs(@eW$CO6&P)np6 zq#KgLfrPS224Jn>Dbb2VV3Wj|jXANcKx~G$~ z)84_nqoTyIh7MMZq`Sm1z4JUsu9K1>S)AJ$ULaq{t zCL!wXf|a(bcBbMax`oAM=qrA~m(;oYlXcW6R3dG{&PZER`Lf#1Y2HXVdA<|(7U3c| zLp}M0gpz_DhaFq`4+)Friz&1qGTH@0@2#u1lDdk%-cu@gc$-{1b{_=SU!9=h9k3uWnzAfp$Ft`J!^hCi6l zMCz|R%_Z`~4-*~GynB1)$W?l*8C*HC3o?fS@cD=e*+XH-q_Wyb7S6iEdib&IHd~o3 z*p%p>DhgRF^Zi5!yV(Kn9dN+)Bkgc=*E}RAy6#KrpZ~A=E{$Y(nU!AxCGP9QgGqbC z(rl8QU_sW8-!walc%Jq8`!?RK|9!UxuGt5EytD_L!wvAwqb}!Nj(wgNVbn7Q^X|Go E0F_?Ei~s-t delta 1675 zcmb7EZ)j6j6o2<6U7zhun>Mjco7f~asj;genN_L(maakKC~0V$=nB#@sv`JjY;m)# z)#oP>1)F!ix<7QKFdR&M`!G-;L;E>_!9d)=4}KPf6cncMoR{~Sr?pHEoOka%_nhB3 z_xySCe@y;|%|$i{2H6FH<6cC5RW6rF%;2WA^X9}HQ^Y~$0Ke#Mn7F-gccJ(fYsG8X z2h-v-y8z2#67Gpn$XbSM>?6GCL`IA0ww#aXpGClLV)UC*id1^1DHj zHenO0QZ`rAD<~BFY80h8ArZcz4B6%s+!rHI($}mb#T!t;csB(ACC4ZvHb%spq)t0O zXPm5UCKR=_o{P8IuP~Twx5G8J%la+e!XIv5@H^a`L7qaMMV>)Ei%j`ChwFJ{S$)}d zb+s)w+rne_q(pv+w4kz{6mLQ6b;!Cf1kXK#+=7BoRTzNmh9altpqf_AI|??TR+m(z z-XR#UM4^Q1y`DqxQ_ljgK_%ZCrv58RN1Xdt8Fv)9QHi$^`DdtIL?%)`Nk|@Ct4e`_ z<~AF|0ic#>GvAhi1sV^v)Wwnd(IrPaLMBveabZc&==>)li2WMSl!3RL4pfmMC6wU#TM#Jg)pv!r`j zvv#8r6~Kt4W*QH7;D!G@b|YXnYTatCtXgt%R-cn9Q)&^G;L)%T{*5ofrTur<4gEB% zga;}wHDT5JEg>XKBd-`qA zWK*9LfiL3(PttAG4u{g+=)1Y~V1bfrrbRq>;Yo6{G8O`saY1Y>2J+dSK>xmIG`=I= z*VjK=pZ@0X*WoWuWqZ5&%ip_S?oz;cx$(h`-B3<%LnnVW buildCandles -> periodsLoop -> loopBody -> nextCandleFile -> fileName = " + fileName); } if (FULL_LOG === true) { logger.write("[INFO] start -> buildCandles -> periodsLoop -> loopBody -> nextCandleFile -> filePath = " + filePath); } - bruceFileStorage.getTextFile(filePath, fileName, onFileReceived, true); + bruceStorage.getTextFile(filePath, fileName, onFileReceived, true); function onFileReceived(err, text) { @@ -403,7 +403,7 @@ Read the candles and volumes from Bruce and produce a file for each day and for if (FULL_LOG === true) { logger.write("[INFO] start -> buildCandles -> periodsLoop -> loopBody -> nextVolumeFile -> fileName = " + fileName); } if (FULL_LOG === true) { logger.write("[INFO] start -> buildCandles -> periodsLoop -> loopBody -> nextVolumeFile -> filePath = " + filePath); } - bruceFileStorage.getTextFile(filePath, fileName, onFileReceived, true); + bruceStorage.getTextFile(filePath, fileName, onFileReceived, true); function onFileReceived(err, text) { @@ -550,7 +550,7 @@ Read the candles and volumes from Bruce and produce a file for each day and for if (FULL_LOG === true) { logger.write("[INFO] start -> writeFiles -> writeCandles -> fileName = " + fileName); } if (FULL_LOG === true) { logger.write("[INFO] start -> writeFiles -> writeCandles -> filePath = " + filePath); } - utilities.createFolderIfNeeded(filePath, oliviaFileStorage, onFolderCreated); + utilities.createFolderIfNeeded(filePath, oliviaStorage, onFolderCreated); function onFolderCreated(err) { @@ -562,7 +562,7 @@ Read the candles and volumes from Bruce and produce a file for each day and for return; } - oliviaFileStorage.createTextFile(filePath, fileName, fileContent + '\n', onFileCreated); + oliviaStorage.createTextFile(filePath, fileName, fileContent + '\n', onFileCreated); function onFileCreated(err) { @@ -614,7 +614,7 @@ Read the candles and volumes from Bruce and produce a file for each day and for if (FULL_LOG === true) { logger.write("[INFO] start -> writeFiles -> writeVolumes -> fileName = " + fileName); } if (FULL_LOG === true) { logger.write("[INFO] start -> writeFiles -> writeVolumes -> filePath = " + filePath); } - utilities.createFolderIfNeeded(filePath, oliviaFileStorage, onFolderCreated); + utilities.createFolderIfNeeded(filePath, oliviaStorage, onFolderCreated); function onFolderCreated(err) { @@ -626,7 +626,7 @@ Read the candles and volumes from Bruce and produce a file for each day and for return; } - oliviaFileStorage.createTextFile(filePath, fileName, fileContent + '\n', onFileCreated); + oliviaStorage.createTextFile(filePath, fileName, fileContent + '\n', onFileCreated); function onFileCreated(err) { diff --git a/Multi-Period-Market/User.bot.js b/Multi-Period-Market/User.bot.js index 197bc3b44..6bf8d14c3 100644 --- a/Multi-Period-Market/User.bot.js +++ b/Multi-Period-Market/User.bot.js @@ -1,4 +1,4 @@ -exports.newUserBot = function newUserBot(BOT, COMMONS, UTILITIES, DEBUG_MODULE, FILE_STORAGE) { +exports.newUserBot = function newUserBot(BOT, COMMONS, UTILITIES, DEBUG_MODULE, FILE_STORAGE, BLOB_STORAGE) { const FULL_LOG = true; const LOG_FILE_CONTENT = false; @@ -32,8 +32,8 @@ start: start }; - let oliviaFileStorage = FILE_STORAGE.newFileStorage(bot); - let bruceFileStorage = FILE_STORAGE.newFileStorage(bot); + let oliviaStorage = BLOB_STORAGE.newBlobStorage(bot); + let bruceStorage = BLOB_STORAGE.newBlobStorage(bot); let utilities = UTILITIES.newUtilities(bot); @@ -51,7 +51,7 @@ dependencies = pDependencies; - commons.initializeStorage(oliviaFileStorage, bruceFileStorage, onInizialized); + commons.initializeStorage(oliviaStorage, bruceStorage, onInizialized); function onInizialized(err) { @@ -238,7 +238,7 @@ Read the candles and volumes from Bruce and produce a single Index File for Mark if (FULL_LOG === true) { logger.write("[INFO] start -> findPreviousContent -> loopBody -> getCandles -> fileName = " + fileName); } if (FULL_LOG === true) { logger.write("[INFO] start -> findPreviousContent -> loopBody -> getCandles -> filePath = " + filePath); } - oliviaFileStorage.getTextFile(filePath, fileName, onFileReceived, true); + oliviaStorage.getTextFile(filePath, fileName, onFileReceived, true); function onFileReceived(err, text) { @@ -278,7 +278,7 @@ Read the candles and volumes from Bruce and produce a single Index File for Mark if (FULL_LOG === true) { logger.write("[INFO] start -> findPreviousContent -> loopBody -> getVolumes -> fileName = " + fileName); } if (FULL_LOG === true) { logger.write("[INFO] start -> findPreviousContent -> loopBody -> getVolumes -> filePath = " + filePath); } - oliviaFileStorage.getTextFile(filePath, fileName, onFileReceived, true); + oliviaStorage.getTextFile(filePath, fileName, onFileReceived, true); function onFileReceived(err, text) { @@ -477,7 +477,7 @@ Read the candles and volumes from Bruce and produce a single Index File for Mark if (FULL_LOG === true) { logger.write("[INFO] start -> buildCandles -> periodsLoop -> loopBody -> nextCandleFile -> fileName = " + fileName); } if (FULL_LOG === true) { logger.write("[INFO] start -> buildCandles -> periodsLoop -> loopBody -> nextCandleFile -> filePath = " + filePath); } - bruceFileStorage.getTextFile(filePath, fileName, onFileReceived, true); + bruceStorage.getTextFile(filePath, fileName, onFileReceived, true); function onFileReceived(err, text) { @@ -593,7 +593,7 @@ Read the candles and volumes from Bruce and produce a single Index File for Mark if (FULL_LOG === true) { logger.write("[INFO] start -> buildCandles -> periodsLoop -> loopBody -> nextVolumeFile -> fileName = " + fileName); } if (FULL_LOG === true) { logger.write("[INFO] start -> buildCandles -> periodsLoop -> loopBody -> nextVolumeFile -> filePath = " + filePath); } - bruceFileStorage.getTextFile(filePath, fileName, onFileReceived, true); + bruceStorage.getTextFile(filePath, fileName, onFileReceived, true); function onFileReceived(err, text) { @@ -739,7 +739,7 @@ Read the candles and volumes from Bruce and produce a single Index File for Mark if (FULL_LOG === true) { logger.write("[INFO] start -> writeFiles -> writeCandles -> fileName = " + fileName); } if (FULL_LOG === true) { logger.write("[INFO] start -> writeFiles -> writeCandles -> filePath = " + filePath); } - utilities.createFolderIfNeeded(filePath, oliviaFileStorage, onFolderCreated); + utilities.createFolderIfNeeded(filePath, oliviaStorage, onFolderCreated); function onFolderCreated(err) { @@ -751,7 +751,7 @@ Read the candles and volumes from Bruce and produce a single Index File for Mark return; } - oliviaFileStorage.createTextFile(filePath, fileName, fileContent + '\n', onFileCreated); + oliviaStorage.createTextFile(filePath, fileName, fileContent + '\n', onFileCreated); function onFileCreated(err) { @@ -802,7 +802,7 @@ Read the candles and volumes from Bruce and produce a single Index File for Mark if (FULL_LOG === true) { logger.write("[INFO] start -> writeFiles -> writeVolumes -> fileName = " + fileName); } if (FULL_LOG === true) { logger.write("[INFO] start -> writeFiles -> writeVolumes -> filePath = " + filePath); } - utilities.createFolderIfNeeded(filePath, oliviaFileStorage, onFolderCreated); + utilities.createFolderIfNeeded(filePath, oliviaStorage, onFolderCreated); function onFolderCreated(err) { @@ -814,7 +814,7 @@ Read the candles and volumes from Bruce and produce a single Index File for Mark return; } - oliviaFileStorage.createTextFile(filePath, fileName, fileContent + '\n', onFileCreated); + oliviaStorage.createTextFile(filePath, fileName, fileContent + '\n', onFileCreated); function onFileCreated(err) {