diff --git a/awx/main/management/commands/run_callback_receiver.py b/awx/main/management/commands/run_callback_receiver.py index 8bcb6f14e3..55f39d5d4a 100644 --- a/awx/main/management/commands/run_callback_receiver.py +++ b/awx/main/management/commands/run_callback_receiver.py @@ -85,6 +85,7 @@ def process_job_event(data): data.pop(key) data['play'] = data.get('event_data', {}).get('play', '').strip() data['task'] = data.get('event_data', {}).get('task', '').strip() + data['host_name'] = data.get('event_data', {}).get('host', '').strip() for retry_count in xrange(11): try: if event == 'playbook_on_stats': diff --git a/awx/main/management/commands/run_task_system.py b/awx/main/management/commands/run_task_system.py index 6b22fe8621..18bb7d5795 100644 --- a/awx/main/management/commands/run_task_system.py +++ b/awx/main/management/commands/run_task_system.py @@ -262,14 +262,13 @@ def run_taskmanager(command_port): paused = False task_capacity = get_system_task_capacity() command_context = zmq.Context() - command_socket = command_context.socket(zmq.REP) + command_socket = command_context.socket(zmq.PULL) command_socket.bind(command_port) print("Listening on %s" % command_port) last_rebuild = datetime.datetime.fromtimestamp(0) while True: try: message = command_socket.recv_json(flags=zmq.NOBLOCK) - command_socket.send("1") except zmq.ZMQError,e: message = None if message is not None or (datetime.datetime.now() - last_rebuild).seconds > 10: diff --git a/awx/main/models/jobs.py b/awx/main/models/jobs.py index 559e87c533..854818a875 100644 --- a/awx/main/models/jobs.py +++ b/awx/main/models/jobs.py @@ -479,6 +479,9 @@ class JobEvent(CreatedModifiedModel): on_delete=models.SET_NULL, editable=False, ) + host_name = models.CharField( + max_length=1024, + default='') hosts = models.ManyToManyField( 'Host', related_name='job_events',