mirror of
https://github.com/ansible/awx.git
synced 2026-01-15 20:00:43 -03:30
Fix a bug where a socket would re-emit its message 3 extra times
This commit is contained in:
parent
8c4aee35d1
commit
bf04a56b68
@ -103,7 +103,7 @@ class Socket(object):
|
||||
self._socket.close()
|
||||
self._socket = None
|
||||
self._context = None
|
||||
|
||||
|
||||
def publish(self, message):
|
||||
"""Publish a message over the socket."""
|
||||
|
||||
@ -130,6 +130,7 @@ class Socket(object):
|
||||
try:
|
||||
self._socket.send_json(message)
|
||||
self._socket.recv()
|
||||
break
|
||||
except Exception as ex:
|
||||
if self._logger:
|
||||
self._logger.info('Publish Exception: %r; retry=%d',
|
||||
|
||||
@ -1193,7 +1193,6 @@ class JobTest(BaseJobTestMixin, django.test.TestCase):
|
||||
|
||||
@override_settings(CELERY_ALWAYS_EAGER=True,
|
||||
CELERY_EAGER_PROPAGATES_EXCEPTIONS=True,
|
||||
CALLBACK_CONSUMER_PORT='',
|
||||
ANSIBLE_TRANSPORT='local')
|
||||
class JobStartCancelTest(BaseJobTestMixin, django.test.LiveServerTestCase):
|
||||
'''Job API tests that need to use the celery task backend.'''
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user