mirror of
https://github.com/ansible/awx.git
synced 2026-03-28 06:15:04 -02:30
Emit an event 'summary_complete' when jobhostsummary is finished calculating
This commit is contained in:
@@ -40,6 +40,7 @@ from awx.main.constants import CLOUD_PROVIDERS
|
|||||||
from awx.main.models.base import *
|
from awx.main.models.base import *
|
||||||
from awx.main.models.unified_jobs import *
|
from awx.main.models.unified_jobs import *
|
||||||
from awx.main.utils import encrypt_field, decrypt_field, ignore_inventory_computed_fields
|
from awx.main.utils import encrypt_field, decrypt_field, ignore_inventory_computed_fields
|
||||||
|
from awx.main.utils import emit_websocket_notification
|
||||||
|
|
||||||
# Celery
|
# Celery
|
||||||
from celery import chain
|
from celery import chain
|
||||||
@@ -795,4 +796,5 @@ class JobEvent(CreatedModifiedModel):
|
|||||||
if update_fields:
|
if update_fields:
|
||||||
host_summary.save(update_fields=update_fields)
|
host_summary.save(update_fields=update_fields)
|
||||||
job.inventory.update_computed_fields()
|
job.inventory.update_computed_fields()
|
||||||
|
emit_websocket_notification('/socket.io/jobs', 'summary_complete', dict(unified_job_id=job.id))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user