display client finish time for incomplete job statuses

This commit is contained in:
Jake McDermott 2018-05-22 13:57:37 -04:00
parent 2cbadcd392
commit 89e08460dd
No known key found for this signature in database
GPG Key ID: 3B02CAD476EECB35

View File

@ -107,10 +107,8 @@ function JobStatusService (moment, message) {
}
};
this.isExpectingStatsEvent = () => (
(this.jobType === 'job') ||
(this.jobType === 'project_update')) &&
(!_.includes(INCOMPLETE, this.state.status));
this.isExpectingStatsEvent = () => (this.jobType === 'job') ||
(this.jobType === 'project_update');
this.updateStats = () => {
this.updateHostCounts();
@ -155,7 +153,10 @@ function JobStatusService (moment, message) {
this.setJobStatus = status => {
this.state.status = status;
if (!this.isExpectingStatsEvent() && _.includes(FINISHED, status)) {
const isIncomplete = _.includes(INCOMPLETE, status);
const isFinished = _.includes(FINISHED, status);
if ((this.isExpectingStatsEvent() && isIncomplete) || isFinished) {
if (this.latestTime) {
this.setFinished(this.latestTime);
if (!this.state.started && this.state.elapsed) {