mirror of
https://github.com/ansible/awx.git
synced 2026-08-03 03:19:57 -02:30
converting from socketio to channels websocket
This commit is contained in:
@@ -29,12 +29,13 @@ from awx.main.models.notifications import (
|
||||
JobNotificationMixin,
|
||||
)
|
||||
from awx.main.utils import decrypt_field, ignore_inventory_computed_fields
|
||||
from awx.main.utils import emit_websocket_notification
|
||||
from awx.main.redact import PlainTextCleaner
|
||||
from awx.main.conf import tower_settings
|
||||
from awx.main.fields import ImplicitRoleField
|
||||
from awx.main.models.mixins import ResourceMixin
|
||||
|
||||
from awx.main.consumers import emit_channel_notification
|
||||
|
||||
|
||||
logger = logging.getLogger('awx.main.models.jobs')
|
||||
|
||||
@@ -1259,11 +1260,10 @@ 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))
|
||||
|
||||
emit_channel_notification('jobs-summary', dict(unified_job_id=job.id))
|
||||
|
||||
@classmethod
|
||||
def start_event_queryset(cls, parent_task, starting_events, ordering=None):
|
||||
def get_startevent_queryset(cls, parent_task, starting_events, ordering=None):
|
||||
'''
|
||||
We need to pull information about each start event.
|
||||
|
||||
@@ -1369,7 +1369,7 @@ class SystemJob(UnifiedJob, SystemJobOptions, JobNotificationMixin):
|
||||
from awx.main.tasks import RunSystemJob
|
||||
return RunSystemJob
|
||||
|
||||
def socketio_emit_data(self):
|
||||
def websocket_emit_data(self):
|
||||
return {}
|
||||
|
||||
def get_absolute_url(self):
|
||||
|
||||
Reference in New Issue
Block a user