mirror of
https://github.com/ansible/awx.git
synced 2026-03-18 17:37:30 -02:30
Call this.sync when we receive a ws complete message.
- There can be a race condition where a job run finishes event processing before sending off a "successful/failed" websocket message. In this instance, we would miss gathering known artifacts for a job. The proposed fix is to do a manual detection of when a job status updates to "successful/failed/unknown" and perform a GET request to the job endpoint.
This commit is contained in:
@@ -810,7 +810,6 @@ function OutputIndexController (
|
|||||||
onStop () {
|
onStop () {
|
||||||
lockFollow = true;
|
lockFollow = true;
|
||||||
stopFollowing();
|
stopFollowing();
|
||||||
stopListening();
|
|
||||||
status.updateStats();
|
status.updateStats();
|
||||||
status.dispatch();
|
status.dispatch();
|
||||||
status.sync();
|
status.sync();
|
||||||
|
|||||||
@@ -95,6 +95,9 @@ function JobStatusService (moment, message) {
|
|||||||
|
|
||||||
if (isJobStatusEvent) {
|
if (isJobStatusEvent) {
|
||||||
this.setJobStatus(data.status);
|
this.setJobStatus(data.status);
|
||||||
|
if (JOB_STATUS_FINISHED.includes(data.status)) {
|
||||||
|
this.sync();
|
||||||
|
}
|
||||||
this.dispatch();
|
this.dispatch();
|
||||||
} else if (isProjectStatusEvent) {
|
} else if (isProjectStatusEvent) {
|
||||||
this.setProjectStatus(data.status);
|
this.setProjectStatus(data.status);
|
||||||
|
|||||||
Reference in New Issue
Block a user