mirror of
https://github.com/ansible/awx.git
synced 2026-01-15 03:40:42 -03:30
Merge pull request #1918 from jakemcdermott/job-results/fix-status-check
improve status checking for job results
This commit is contained in:
commit
845227a9c4
@ -151,12 +151,11 @@ function JobStatusService (moment, message) {
|
||||
};
|
||||
|
||||
this.setJobStatus = status => {
|
||||
this.state.status = status;
|
||||
|
||||
const isExpectingStats = this.isExpectingStatsEvent();
|
||||
const isIncomplete = _.includes(INCOMPLETE, status);
|
||||
const isFinished = _.includes(FINISHED, status);
|
||||
|
||||
if ((this.isExpectingStatsEvent() && isIncomplete) || isFinished) {
|
||||
if ((isExpectingStats && isIncomplete) || (!isExpectingStats && isFinished)) {
|
||||
if (this.latestTime) {
|
||||
this.setFinished(this.latestTime);
|
||||
if (!this.state.started && this.state.elapsed) {
|
||||
@ -166,6 +165,7 @@ function JobStatusService (moment, message) {
|
||||
}
|
||||
}
|
||||
|
||||
this.state.status = status;
|
||||
this.updateRunningState();
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user