Browse Source

async

master
zeus 4 years ago
parent
commit
5c5e45c131
  1. 2
      swarmlab-app/src/run/app.js

2
swarmlab-app/src/run/app.js

@ -455,6 +455,7 @@ function onCollection(err, collection) {
} }
console.log('update '+JSON.stringify(indexupdate)); console.log('update '+JSON.stringify(indexupdate));
if (indexupdate == "yes" ){ if (indexupdate == "yes" ){
(async() => {
var token = "d2539e5a7ae1f9f1b0eb2b8f22ca467a86d28407"; // desto var token = "d2539e5a7ae1f9f1b0eb2b8f22ca467a86d28407"; // desto
var resdata = await getpipelines(token,pathfile) var resdata = await getpipelines(token,pathfile)
resob.pathlogfile = pathfileval resob.pathlogfile = pathfileval
@ -483,6 +484,7 @@ function onCollection(err, collection) {
} }
itemsProcessed++; itemsProcessed++;
}); });
})() //await inside yes
}else{ }else{
await pubClient.get(pathfileval, function(err, object) { await pubClient.get(pathfileval, function(err, object) {
var objecttmp = JSON.parse(object); var objecttmp = JSON.parse(object);

Loading…
Cancel
Save