Commit d47106ff authored by Bryan  BRANCOTTE's avatar Bryan BRANCOTTE
Browse files

resilience to error when querying status of queue, or project

parent cfab04cb
......@@ -316,6 +316,7 @@ export default {
created(){
this.status = this.getStatus();
this.getQueueStatus();
},
......@@ -569,13 +570,20 @@ methods:{
this.Regions=this.manhattan.data.datarows
},
async getStatus(){
async getQueueStatus(){
if (this.isready)
return;
await this.$axios.$get('/queue_status').then((function (resultStatus) {
console.log(resultStatus);
this.activeTask = resultStatus.active;
this.pendingTask = resultStatus.reserved;
console.log(resultStatus);
this.activeTask = resultStatus.active;
this.pendingTask = resultStatus.reserved;
setTimeout(this.getQueueStatus, 5000);
}).bind(this)).catch((function () {
setTimeout(this.getQueueStatus, 10000);
}).bind(this));
},
async getStatus(){
await this.$axios.$get('/projects/'+this.project.id).then((async function (result) {
......@@ -613,10 +621,12 @@ methods:{
}
for (const step in result.status){
if (result.status[step] !=="READY"){
setTimeout(this.getStatus, 3000);
setTimeout(this.getStatus, 5000);
break;
}
}
}).bind(this)).catch((function () {
setTimeout(this.getStatus, 10000);
}).bind(this));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment