mirror of
https://github.com/ansible/awx.git
synced 2024-11-01 08:21:15 +03:00
improve the check performed to determine if a job is in an active state
This commit is contained in:
parent
156b5e6979
commit
34dc939782
@ -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…
Reference in New Issue
Block a user