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