From b9c515ac2b8ece8b997cf6d1758490821a67df70 Mon Sep 17 00:00:00 2001 From: Matthew Jones Date: Tue, 19 Aug 2014 12:07:21 -0400 Subject: [PATCH] Emit an event 'summary_complete' when jobhostsummary is finished calculating --- awx/main/models/jobs.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/awx/main/models/jobs.py b/awx/main/models/jobs.py index 376cea4e5a..03c8099b39 100644 --- a/awx/main/models/jobs.py +++ b/awx/main/models/jobs.py @@ -40,6 +40,7 @@ from awx.main.constants import CLOUD_PROVIDERS from awx.main.models.base 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 emit_websocket_notification # Celery from celery import chain @@ -795,4 +796,5 @@ class JobEvent(CreatedModifiedModel): if update_fields: host_summary.save(update_fields=update_fields) job.inventory.update_computed_fields() + emit_websocket_notification('/socket.io/jobs', 'summary_complete', dict(unified_job_id=job.id))