diff --git a/awx/main/socket.py b/awx/main/socket.py index 862fbe0ee8..679b5f5fd0 100644 --- a/awx/main/socket.py +++ b/awx/main/socket.py @@ -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', diff --git a/awx/main/tests/jobs.py b/awx/main/tests/jobs.py index 47a4ec3787..0f7dec19e1 100644 --- a/awx/main/tests/jobs.py +++ b/awx/main/tests/jobs.py @@ -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.'''