Azure File Storage optimization

This commit is contained in:
Luis Fernando Molina committed 2018-02-22 12:45:51 +01:00
1 parent 5bf74bbd3e
commit e6b65070b3
5 files changed
+37 -2

No files matched your search

Binary file not shown.
+1 -1
View File
@@ -13,7 +13,7 @@
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
<Name>AACloudPlatform</Name>
<ScriptArguments>Multi-Period-Daily</ScriptArguments>
<ScriptArguments>Multi-Period-Market</ScriptArguments>
<NodeExePath>C:\Program Files\nodejs\node.exe</NodeExePath>
<StartWebBrowser>False</StartWebBrowser>
</PropertyGroup>
+28
View File
@@ -72,6 +72,13 @@ exports.newAzureFileStorage = function newAzureFileStorage(BOT) {
function createFolder(folderPath, callBackFunction) {
if (fileService === undefined) {
const logText = "[ERROR] initialize function not executed or failed. Can not process this request. Sorry.";
logger.write(logText);
return;
}
try {
fileService.createDirectoryIfNotExists(shareName, folderPath, onFolderCreated);
@@ -100,6 +107,13 @@ exports.newAzureFileStorage = function newAzureFileStorage(BOT) {
function createTextFile(folderPath, fileName, fileContent, callBackFunction) {
if (fileService === undefined) {
const logText = "[ERROR] initialize function not executed or failed. Can not process this request. Sorry.";
logger.write(logText);
return;
}
try {
fileService.createFileFromText(shareName, folderPath, fileName, fileContent, onFileCreated);
@@ -148,6 +162,13 @@ exports.newAzureFileStorage = function newAzureFileStorage(BOT) {
function getTextFile(folderPath, fileName, callBackFunction, ignoreNotFound) {
if (fileService === undefined) {
const logText = "[ERROR] initialize function not executed or failed. Can not process this request. Sorry.";
logger.write(logText);
return;
}
try {
fileService.getFileToText(shareName, folderPath, fileName, undefined, onFileReceived);
@@ -181,6 +202,13 @@ exports.newAzureFileStorage = function newAzureFileStorage(BOT) {
function listFilesAndFolders(folderPath, callBackFunction) {
if (fileService === undefined) {
const logText = "[ERROR] initialize function not executed or failed. Can not process this request. Sorry.";
logger.write(logText);
return;
}
try {
let items = {
+7
View File
@@ -0,0 +1,7 @@
{
"useDevelopmentStorage": false,
"connectionString": "DefaultEndpointsProtocol=https;AccountName=aatestnet;AccountKey=rQRuD8KeD0upqcN9532zqZTknKwkYJDpGzkATGptk9lIEovkLchdOGOJVld26cUjpzTA4enxsxpCB33B0pOZRg==;EndpointSuffix=core.windows.net",
"accountName": "",
"accountKey": "",
"sas": ""
}
+1 -1
View File
@@ -1,5 +1,5 @@
{
"bot": {
"path": "../AAOlivia-Indicator-Bot"
"path": "../AATom-Indicator-Bot"
}
}