Bugs Fixed
This commit is contained in:
1 parent
a2d23584c8
commit
406499438a
5 files changed
+17
-41
No files matched your search
+3
-7
@@ -49,11 +49,7 @@ function newDailyFiles () {
|
||||
try {
|
||||
callBackWhenFileReceived = callBackFunction
|
||||
|
||||
let exchange = ecosystem.getExchange(pProduct, pExchange)
|
||||
|
||||
if (exchange === undefined) {
|
||||
throw 'Exchange not supoorted by this product of the ecosystem! - pDataMine.code.codeName = ' + pDataMine.code.codeName + ', pBot.code.codeName = ' + pBot.code.codeName + ', pProduct.code.codeName = ' + pProduct.code.codeName + ', pExchange = ' + pExchange
|
||||
}
|
||||
let exchange = pExchange
|
||||
|
||||
fileCloud = newFileCloud()
|
||||
fileCloud.initialize(pBot)
|
||||
@@ -107,7 +103,7 @@ function newDailyFiles () {
|
||||
let periodTime = dailyFilePeriods[i][0]
|
||||
let periodName = dailyFilePeriods[i][1]
|
||||
|
||||
if (pDataset.validPeriods.includes(periodName) === true) {
|
||||
if (pDataset.code.validTimeFrames.includes(periodName) === true) {
|
||||
let fileCursor = newFileCursor()
|
||||
fileCursor.eventHandler = thisObject.eventHandler // We share our event handler with each file cursor, so that they can raise events there when files are changed.s
|
||||
fileCursor.initialize(fileCloud, pDataMine, pBot, pSession, pProduct, pDataset, exchange, pMarket, periodName, periodTime, pDatetime, pTimeFrame, beginDateRange, endDateRange, onInitialized)
|
||||
@@ -143,7 +139,7 @@ function newDailyFiles () {
|
||||
let periodTime = dailyFilePeriods[i][0]
|
||||
let periodName = dailyFilePeriods[i][1]
|
||||
|
||||
if (pDataset.validPeriods.includes(periodName) === true) {
|
||||
if (pDataset.code.validTimeFrames.includes(periodName) === true) {
|
||||
let fileCursor = fileCursors.get(periodTime)
|
||||
fileCursor.reload(onFileReceived)
|
||||
}
|
||||
|
||||
+9
-13
@@ -36,18 +36,18 @@ function newFileCloud () {
|
||||
function getFileRecursively (pRetryCounter, pDataMine, pBot, pSession, pDataset, pExchange, pMarket, pPeriodName, pDatetime, pSequence, pDataRange, callBackFunction) {
|
||||
try {
|
||||
if (INFO_LOG === true) { logger.write('[INFO] getFile -> getFileRecursively -> Entering function.') }
|
||||
if (INFO_LOG === true) { logger.write('[INFO] getFile -> getFileRecursively -> key = ' + pDataMine.code.codeName + '-' + pBot.code.codeName + '-' + pDataset.filePath + '-' + pDataset.fileName) }
|
||||
if (INFO_LOG === true) { logger.write('[INFO] getFile -> getFileRecursively -> key = ' + pDataMine.code.codeName + '-' + pBot.code.codeName + '-' + pDataset.code.filePath + '-' + pDataset.code.fileName) }
|
||||
|
||||
let fileName
|
||||
let filePath
|
||||
|
||||
if (pDataRange === undefined) {
|
||||
fileName = pDataset.fileName
|
||||
filePath = pDataset.filePath
|
||||
fileName = pDataset.code.fileName
|
||||
filePath = pDataset.code.filePath
|
||||
} else {
|
||||
if (pDataset.dataRange !== undefined) {
|
||||
fileName = pDataset.dataRange.fileName
|
||||
filePath = pDataset.dataRange.filePath
|
||||
if (pDataset.code.dataRange !== undefined) {
|
||||
fileName = pDataset.code.dataRange.fileName
|
||||
filePath = pDataset.code.dataRange.filePath
|
||||
} else {
|
||||
let customErr = {
|
||||
result: GLOBAL.CUSTOM_FAIL_RESPONSE.result,
|
||||
@@ -84,11 +84,7 @@ function newFileCloud () {
|
||||
}
|
||||
|
||||
if (pBot !== undefined) {
|
||||
if (pBot.cloneId !== undefined) {
|
||||
filePath = filePath.replace('@Bot', pBot.code.codeName + '-' + pBot.cloneId)
|
||||
} else {
|
||||
filePath = filePath.replace('@Bot', pBot.code.codeName)
|
||||
}
|
||||
filePath = filePath.replace('@Bot', pBot.code.codeName)
|
||||
}
|
||||
|
||||
if (pSession !== undefined) {
|
||||
@@ -108,7 +104,7 @@ function newFileCloud () {
|
||||
}
|
||||
|
||||
if (pExchange !== undefined) {
|
||||
filePath = filePath.replace('@Exchange', pExchange.code.code.codeName)
|
||||
filePath = filePath.replace('@Exchange', pExchange.code.codeName)
|
||||
}
|
||||
|
||||
filePath = filePath.replace('@Period', pPeriodName)
|
||||
@@ -130,7 +126,7 @@ function newFileCloud () {
|
||||
|
||||
let containerName
|
||||
|
||||
containerName = pDataMine.code.codeName.toLowerCase()
|
||||
containerName = pDataMine.codeName.toLowerCase()
|
||||
|
||||
blobService.getBlobToText(containerName, filePath + '/' + fileName, pDataMine.host, onFileReceived)
|
||||
|
||||
|
||||
+1
-6
@@ -61,12 +61,7 @@ function newFileSequence () {
|
||||
|
||||
function initialize (pDataMine, pBot, pSession, pProduct, pDataset, pExchange, pMarket, callBackFunction) {
|
||||
try {
|
||||
exchange = ecosystem.getExchange(pProduct, pExchange)
|
||||
|
||||
if (exchange === undefined) {
|
||||
throw 'Exchange not supoorted by this pProduct of the ecosystem! - pDataMine.code.codeName = ' + pDataMine.code.codeName + ', pBot.code.codeName = ' + pBot.code.codeName + ', pProduct.code.codeName = ' + pProduct.code.codeName + ', pExchange = ' + pExchange
|
||||
}
|
||||
|
||||
exchange = pExchange
|
||||
market = pMarket
|
||||
dataMine = pDataMine
|
||||
bot = pBot
|
||||
|
||||
+3
-8
@@ -67,12 +67,7 @@ function newMarketFiles () {
|
||||
|
||||
function initialize (pDataMine, pBot, pSession, pProduct, pDataset, pExchange, pMarket, callBackFunction) {
|
||||
try {
|
||||
exchange = ecosystem.getExchange(pProduct, pExchange)
|
||||
|
||||
if (exchange === undefined) {
|
||||
throw 'Exchange not supoorted by this pProduct of the ecosystem! - pDataMine.code.codeName = ' + pDataMine.code.codeName + ', pBot.code.codeName = ' + pBot.code.codeName + ', pProduct.code.codeName = ' + pProduct.code.codeName + ', pExchange = ' + pExchange
|
||||
}
|
||||
|
||||
exchange = pExchange
|
||||
market = pMarket
|
||||
dataMine = pDataMine
|
||||
bot = pBot
|
||||
@@ -89,7 +84,7 @@ function newMarketFiles () {
|
||||
let periodTime = marketFilesPeriods[i][0]
|
||||
let periodName = marketFilesPeriods[i][1]
|
||||
|
||||
if (dataset.validPeriods.includes(periodName) === true) {
|
||||
if (dataset.code.validTimeFrames.includes(periodName) === true) {
|
||||
fileCloud.getFile(dataMine, bot, session, dataset, exchange, market, periodName, undefined, undefined, undefined, onFileReceived)
|
||||
|
||||
function onFileReceived (err, file) {
|
||||
@@ -136,7 +131,7 @@ function newMarketFiles () {
|
||||
let periodTime = marketFilesPeriods[i][0]
|
||||
let periodName = marketFilesPeriods[i][1]
|
||||
|
||||
if (dataset.validPeriods.includes(periodName) === true) {
|
||||
if (dataset.code.validTimeFrames.includes(periodName) === true) {
|
||||
fileCloud.getFile(dataMine, bot, session, dataset, exchange, market, periodName, undefined, undefined, undefined, onFileReceived)
|
||||
|
||||
function onFileReceived (err, file) {
|
||||
|
||||
+1
-7
@@ -21,13 +21,7 @@ function newSingleFile () {
|
||||
if (INFO_LOG === true) { logger.write('[INFO] initialize -> Entering function.') }
|
||||
if (INFO_LOG === true) { logger.write('[INFO] initialize -> key = ' + pDataMine.code.codeName + '-' + pBot.code.codeName + '-' + pProduct.code.codeName) }
|
||||
|
||||
let exchange = ecosystem.getExchange(pProduct, pExchange)
|
||||
|
||||
if (pExchange !== undefined && exchange === undefined) {
|
||||
// We support no exchange as a parameter, but if provided, then it must be at the list of exchanges of that product.
|
||||
|
||||
throw 'Exchange not supoorted by this pProduct of the ecosystem! - pDataMine.code.codeName = ' + pDataMine.code.codeName + ', pBot.code.codeName = ' + pBot.code.codeName + ', pProduct.code.codeName = ' + pProduct.code.codeName + ', pExchange = ' + pExchange
|
||||
}
|
||||
let exchange = pExchange
|
||||
|
||||
fileCloud = newFileCloud()
|
||||
fileCloud.initialize(pBot)
|
||||
|
||||
Reference in new issue
Block a user