Change zmq socket characterstics to ack response. Fix up unit tests

This commit is contained in:
Matthew Jones
2014-02-21 10:40:53 -05:00
parent 3231f966db
commit 00676c95e0
3 changed files with 10 additions and 9 deletions

View File

@@ -37,6 +37,7 @@ import os
import sys
import urllib
import urlparse
import time
import requests
@@ -109,7 +110,7 @@ class CallbackModule(object):
def _start_connection(self):
self.context = zmq.Context()
self.socket = self.context.socket(zmq.PUSH)
self.socket = self.context.socket(zmq.REQ)
self.socket.connect("tcp://127.0.0.1:5556")
def _post_job_event_queue_msg(self, event, event_data):
@@ -134,6 +135,7 @@ class CallbackModule(object):
self._start_connection()
self.socket.send_json(msg)
self.socket.recv()
return
except Exception, e:
self.logger.info('Publish Exception: %r, retry=%d', e,