First Debug Session Ended
This commit is contained in:
1 parent
32007193c5
commit
2134635f0c
13 files changed
+194
-171
No files matched your search
+19
-15
@@ -1,5 +1,7 @@
|
||||
exports.newDatasource = function newDatasource(BOT, DEBUG_MODULE, FILE_STORAGE) {
|
||||
|
||||
const FULL_LOG = true;
|
||||
|
||||
/*
|
||||
|
||||
This module allows trading bots to access information stored at the cloud storage.
|
||||
@@ -60,6 +62,8 @@
|
||||
|
||||
try {
|
||||
|
||||
if (LOG_INFO === true) { logger.write("[INFO] initialize -> Entering function."); }
|
||||
|
||||
oliviaAzureFileStorage.initialize("Olivia");
|
||||
tomAzureFileStorage.initialize("Tom");
|
||||
|
||||
@@ -69,18 +73,18 @@
|
||||
try {
|
||||
|
||||
switch (err.result) {
|
||||
case DEFAULT_OK_RESPONSE.result: {
|
||||
callBackFunction(DEFAULT_OK_RESPONSE);
|
||||
case global.DEFAULT_OK_RESPONSE.result: {
|
||||
callBackFunction(global.DEFAULT_OK_RESPONSE);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case DEFAULT_RETRY_RESPONSE.result: { // Something bad happened, but if we retry in a while it might go through the next time.
|
||||
case global.DEFAULT_RETRY_RESPONSE.result: { // Something bad happened, but if we retry in a while it might go through the next time.
|
||||
logger.write("[ERROR] initialize -> onDone -> Retry Later. Requesting Execution Retry.");
|
||||
callBackFunction(err);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case DEFAULT_FAIL_RESPONSE.result: { // This is an unexpected exception that we do not know how to handle.
|
||||
case global.DEFAULT_FAIL_RESPONSE.result: { // This is an unexpected exception that we do not know how to handle.
|
||||
logger.write("[ERROR] initialize -> onDone -> Operation Failed. Aborting the process.");
|
||||
callBackFunction(err);
|
||||
return;
|
||||
@@ -90,7 +94,7 @@
|
||||
|
||||
} catch (err) {
|
||||
logger.write("[ERROR] initialize -> onDone -> err = " + err.message);
|
||||
callBackFunction(DEFAULT_FAIL_RESPONSE);
|
||||
callBackFunction(global.DEFAULT_FAIL_RESPONSE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -132,7 +136,7 @@
|
||||
}
|
||||
} catch (err) {
|
||||
logger.write("[ERROR] getCandles -> getMarketFiles -> err = " + err.message);
|
||||
callBack(DEFAULT_FAIL_RESPONSE);
|
||||
callBack(global.DEFAULT_FAIL_RESPONSE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -159,7 +163,7 @@
|
||||
}
|
||||
} catch (err) {
|
||||
logger.write("[ERROR] getCandles -> getDailyFiles -> err = " + err.message);
|
||||
callBack(DEFAULT_FAIL_RESPONSE);
|
||||
callBack(global.DEFAULT_FAIL_RESPONSE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -222,13 +226,13 @@
|
||||
}
|
||||
} catch (err) {
|
||||
logger.write("[ERROR] getCandles -> getCandlesWeAreIn -> err = " + err.message);
|
||||
callBack(DEFAULT_FAIL_RESPONSE);
|
||||
callBack(global.DEFAULT_FAIL_RESPONSE);
|
||||
}
|
||||
}
|
||||
|
||||
} catch (err) {
|
||||
logger.write("[ERROR] getCandles -> err = " + err.message);
|
||||
callBack(DEFAULT_FAIL_RESPONSE);
|
||||
callBack(global.DEFAULT_FAIL_RESPONSE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -269,7 +273,7 @@
|
||||
}
|
||||
} catch (err) {
|
||||
logger.write("[ERROR] getPatterns -> getMarketFiles -> err = " + err.message);
|
||||
callBack(DEFAULT_FAIL_RESPONSE);
|
||||
callBack(global.DEFAULT_FAIL_RESPONSE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -296,7 +300,7 @@
|
||||
}
|
||||
} catch (err) {
|
||||
logger.write("[ERROR] getPatterns -> getDailyFiles -> err = " + err.message);
|
||||
callBack(DEFAULT_FAIL_RESPONSE);
|
||||
callBack(global.DEFAULT_FAIL_RESPONSE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -355,19 +359,19 @@
|
||||
|
||||
if (counter === thisObject.stairsFiles.size) {
|
||||
|
||||
callBack(DEFAULT_OK_RESPONSE);
|
||||
callBack(global.DEFAULT_OK_RESPONSE);
|
||||
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
logger.write("[ERROR] getPatterns -> getStairsWeAreIn -> err = " + err.message);
|
||||
callBack(DEFAULT_FAIL_RESPONSE);
|
||||
callBack(global.DEFAULT_FAIL_RESPONSE);
|
||||
}
|
||||
}
|
||||
|
||||
} catch (err) {
|
||||
logger.write("[ERROR] getPatterns -> err = " + err.message);
|
||||
callBack(DEFAULT_FAIL_RESPONSE);
|
||||
callBack(global.DEFAULT_FAIL_RESPONSE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -416,7 +420,7 @@
|
||||
} catch (err) {
|
||||
|
||||
logger.write("[ERROR] initialize -> err = " + err.message);
|
||||
callBackFunction(DEFAULT_FAIL_RESPONSE);
|
||||
callBackFunction(global.DEFAULT_FAIL_RESPONSE);
|
||||
}
|
||||
}
|
||||
};
|
||||
Reference in new issue
Block a user