Skip to content

Commit

Permalink
Improve install progressbar behavior
Browse files Browse the repository at this point in the history
Counting failed jobs as completed

https://phabricator.endlessm.com/T33760
  • Loading branch information
danigm authored and manuq committed Sep 9, 2022
1 parent 2bad732 commit 11cb0b4
Showing 1 changed file with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@
const runningJobs = this.jobs.filter(j => j.status === 'RUNNING');
const failedJobs = this.jobs.filter(j => j.status === 'FAILED');
const completed = completedJobs.length;
const completed = completedJobs.length + failedJobs.length;
console.log('Downloading: ');
console.log(` Total Jobs: ${this.jobs.length}`);
Expand All @@ -197,11 +197,20 @@
this.$emit('newContent');
}
this.downloading = this.jobs.some(j => j.status !== 'COMPLETED');
this.downloading = this.jobs.some(j => j.status !== 'COMPLETED' && j.status !== 'FAILED');
if (this.downloading) {
this.pollingId = setTimeout(() => this.pollJobs(), 1500);
} else {
this.$emit('newContent');
this.$emit('hide');
this.downloading = false;
}
}
})
.catch(() => {
if (this.downloading) {
this.pollingId = setTimeout(() => this.pollJobs(), 1500);
}
});
},
},
Expand Down

0 comments on commit 11cb0b4

Please sign in to comment.