Make websocket events more informative

* Make sure we always populate workflow information when relevant to
  job status changes.
* Include detail about workflow job node
This commit is contained in:
Matthew Jones
2016-11-22 09:31:17 -05:00
parent 197f39ea70
commit 5df4096660
3 changed files with 17 additions and 5 deletions

View File

@@ -1230,9 +1230,10 @@ class InventoryUpdate(UnifiedJob, InventorySourceOptions, JobNotificationMixin):
return 'DEFAULT_INVENTORY_UPDATE_TIMEOUT'
def websocket_emit_data(self):
websocket_data = super(InventoryUpdate, self).websocket_emit_data()
if self.inventory_source.group is not None:
return dict(group_id=self.inventory_source.group.id)
return {}
websocket_data.update(dict(group_id=self.inventory_source.group.id))
return websocket_data
def save(self, *args, **kwargs):
update_fields = kwargs.get('update_fields', [])