Fix a bug where a socket would re-emit its message 3 extra times

This commit is contained in:
Matthew Jones 2014-11-26 15:51:46 -05:00
parent 8c4aee35d1
commit bf04a56b68
2 changed files with 2 additions and 2 deletions

View File

@ -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',

View File

@ -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.'''