Robert Runing

This commit is contained in:
Luis Fernando Molina committed 2018-06-23 12:05:21 +02:00
1 parent 484fc13da6
commit 93e4719e9e
3 files changed
+24 -24

No files matched your search

+1 -1
View File
@@ -125,10 +125,10 @@ exports.newBlobStorage = function newBlobStorage(BOT, logger) {
if (FULL_LOG === true && logger !== undefined) {
logger.write(MODULE_NAME, "[INFO] createTextFile -> onFileCreated -> Response from Azure received.");
logger.write(MODULE_NAME, "[INFO] createTextFile -> onFileCreated -> err = " + JSON.stringify(err));
logger.write(MODULE_NAME, "[INFO] createTextFile -> onFileCreated -> result = " + JSON.stringify(result));
}
if (LOG_FILE_CONTENT === true && logger !== undefined) {
logger.write(MODULE_NAME, "[INFO] createTextFile -> onFileCreated -> result = " + JSON.stringify(result));
logger.write(MODULE_NAME, "[INFO] getTextFile -> onFileReceived -> response = " + JSON.stringify(response));
logger.write(MODULE_NAME, "[INFO] getTextFile -> onFileReceived -> pFileContent = " + pFileContent);
}
+23 -22
View File
@@ -165,23 +165,6 @@
statusReportModule = statusDependencies.statusReports.get(key);
thisObject.statusReport = statusReportModule.file;
/*
The first time ever a bot is run, it will not have a status report previously saved. In that case, we need to create the basic structure of it
in order to work.
*/
if (thisObject.statusReport.liveRuns === undefined) {
thisObject.statusReport.liveRuns = [];
}
if (thisObject.statusReport.backtestRuns === undefined) {
thisObject.statusReport.backtestRuns = [];
}
if (thisObject.statusReport.competitionRuns === undefined) {
thisObject.statusReport.competitionRuns = [];
}
if (bot.hasTheBotJustStarted === true) {
createConext(callBack);
@@ -268,8 +251,7 @@
/*
It might happen that the file content is corrupt or it does not exist. The bot can not run without an Execution Hitory,
since it is risky to ignore its own history, so even for first time execution, a file with the right format
is needed.
since it is risky to ignore its own history unless it is its first execution in this mode ever.
*/
@@ -362,8 +344,8 @@
/*
It might happen that the file content is corrupt or it does not exist. The bot can not run without a Status Report,
since it is risky to ignore its own history, so even for first time execution, a status report with the right format
is needed.
since it is risky to ignore its own execution history. Execpt when the bot is running for the fist time in this mode,
an execution context file with the right format is needed.
*/
@@ -391,7 +373,10 @@
/* Here, we dont know if the Status Report was ever created or not. To test that we do this. */
if (thisObject.statusReport.liveRuns === undefined) { // This means that the Status Report does not exist.
if (
thisObject.statusReport.liveRuns === undefined &&
thisObject.statusReport.backtestRuns === undefined &&
thisObject.statusReport.competitionRuns === undefined) { // This means that the Status Report does not exist.
thisObject.statusReport = {
liveRuns: [],
@@ -400,6 +385,22 @@
};
}
/*
Maybe the status report exists, but the bot was never run in this mode before. We initialize what is needed.
*/
if (thisObject.statusReport.liveRuns === undefined) {
thisObject.statusReport.liveRuns = [];
}
if (thisObject.statusReport.backtestRuns === undefined) {
thisObject.statusReport.backtestRuns = [];
}
if (thisObject.statusReport.competitionRuns === undefined) {
thisObject.statusReport.competitionRuns = [];
}
switch (bot.startMode) {
case "Live": {
-1
View File
@@ -66,7 +66,6 @@
<SubType>Code</SubType>
</Compile>
<Compile Include="CloudUtilities.js" />
<Compile Include="User.Bot.js" />
</ItemGroup>
<ItemGroup>
<Content Include=".gitignore" />