Saving the bot code and retrieving it without the cache
This commit is contained in:
1 parent
067f4f46f6
commit
cbc9db1f8d
7 files changed
+44
-31
No files matched your search
@@ -24,7 +24,7 @@
|
||||
|
||||
function getScript(pDevTeam, pSource, pRepo, pPath, callBackFunction) {
|
||||
|
||||
storage.getStorageData(pDevTeam + "/" + pSource, pRepo, pPath, onDataArrived);
|
||||
storage.getStorageData(pDevTeam + "/" + pSource, pRepo, pPath, false, onDataArrived);
|
||||
|
||||
function onDataArrived(pData) {
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
*/
|
||||
|
||||
storage.getStorageData('AdvancedAlgos', 'AACloud', 'web.config.json', onDataArrived);
|
||||
storage.getStorageData('AdvancedAlgos', 'AACloud', 'web.config.json', true, onDataArrived);
|
||||
|
||||
function onDataArrived(pData) {
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
|
||||
let webModule = pCloudWebConfig.webModules[i].name + '.js';
|
||||
|
||||
storage.getStorageData('AdvancedAlgos', 'AACloud', webModule, onDataArrived);
|
||||
storage.getStorageData('AdvancedAlgos', 'AACloud', webModule, true, onDataArrived);
|
||||
|
||||
function onDataArrived(pData) {
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
|
||||
*/
|
||||
|
||||
storage.getStorageData('AdvancedAlgos', 'AAPlatform', 'ecosystem.json', onDataArrived);
|
||||
storage.getStorageData('AdvancedAlgos', 'AAPlatform', 'ecosystem.json', true, onDataArrived);
|
||||
|
||||
function onDataArrived(pData) {
|
||||
|
||||
@@ -145,7 +145,7 @@
|
||||
|
||||
requestsSent++;
|
||||
|
||||
storage.getStorageData(host.codeName + "/" + "competitions", competition.repo, competition.configFile, onDataArrived);
|
||||
storage.getStorageData(host.codeName + "/" + "competitions", competition.repo, competition.configFile, true, onDataArrived);
|
||||
|
||||
function onDataArrived(pData) {
|
||||
|
||||
@@ -202,7 +202,7 @@
|
||||
|
||||
requestsSent++;
|
||||
|
||||
storage.getStorageData(host.codeName + "/" + "plotters", plotter.repo, plotter.configFile, onDataArrived);
|
||||
storage.getStorageData(host.codeName + "/" + "plotters", plotter.repo, plotter.configFile, true, onDataArrived);
|
||||
|
||||
function onDataArrived(pData) {
|
||||
|
||||
@@ -291,7 +291,7 @@
|
||||
|
||||
requestsSent++;
|
||||
|
||||
storage.getStorageData(devTeam.codeName + "/" + "bots", bot.repo, bot.configFile, onDataArrived);
|
||||
storage.getStorageData(devTeam.codeName + "/" + "bots", bot.repo, bot.configFile, true, onDataArrived);
|
||||
|
||||
function onDataArrived(pData) {
|
||||
|
||||
@@ -354,7 +354,7 @@
|
||||
|
||||
requestsSent++;
|
||||
|
||||
storage.getStorageData(devTeam.codeName + "/" + "plotters", plotter.repo, plotter.configFile, onDataArrived);
|
||||
storage.getStorageData(devTeam.codeName + "/" + "plotters", plotter.repo, plotter.configFile, true, onDataArrived);
|
||||
|
||||
function onDataArrived(pData) {
|
||||
|
||||
|
||||
+6
-2
@@ -17,7 +17,7 @@
|
||||
|
||||
}
|
||||
|
||||
function getStorageData(pOrg, pRepo, pPath, callBackFunction) {
|
||||
function getStorageData(pOrg, pRepo, pPath, saveAtCache, callBackFunction) {
|
||||
|
||||
try {
|
||||
|
||||
@@ -72,8 +72,12 @@
|
||||
if (CONSOLE_LOG === true) { console.log("[INFO] Storage -> getStorageData -> onFileReceived -> pRepo = " + pRepo); }
|
||||
if (CONSOLE_LOG === true) { console.log("[INFO] Storage -> getStorageData -> onFileReceived -> pPath = " + pPath); }
|
||||
|
||||
storageData.set(pOrg + '.' + pRepo + '.' + pPath, text);
|
||||
if (saveAtCache === true) {
|
||||
|
||||
storageData.set(pOrg + '.' + pRepo + '.' + pPath, text);
|
||||
|
||||
}
|
||||
|
||||
if (err !== null || text === null) {
|
||||
|
||||
if (CONSOLE_LOG === true) { console.log("[ERROR] Storage -> getStorageData -> onFileReceived -> Error Received from Storage Library. "); }
|
||||
|
||||
Reference in new issue
Block a user