diff --git a/zipline/gens/zmq_gens.py b/zipline/gens/zmq_gens.py deleted file mode 100644 index e60dae2b..00000000 --- a/zipline/gens/zmq_gens.py +++ /dev/null @@ -1,18 +0,0 @@ -import zmq - -import zipline.protocol as zp - -def gen_from_zmq(poller, unframe, namestring): - """ - A generator that takes an initialized zmq poller and yields - messages from the poller until it gets a zp.CONTROL_PROTOCOL.DONE. - """ - while True: - message = poller.recv() - # Done protocol should now be a message type so that - # done messages can also have source_ids. - if message.type == zp.CONTROL_PROTOCOL.DONE: - yield done_message(message.source_id) - break - else: - yield unframe(message) diff --git a/zipline/gens/zmqgen.py b/zipline/gens/zmqgen.py deleted file mode 100644 index 66dbdca3..00000000 --- a/zipline/gens/zmqgen.py +++ /dev/null @@ -1,19 +0,0 @@ -import zmq -import zipline.protocol as zp - -def gen_from_pull_socket(socket_uri, context, unframe): - """ - A generator that takes a socket_uri, and yields - messages from the poller until it gets a zp.CONTROL_PROTOCOL.DONE. - """ - pull_socket = context.socket(zmq.PULL) - pull_socket.connect(socket_uri) - poller = zmq.Poller() - poller.register(pull_socket, zmq.POLLIN) - - return gen_from_poller(poller, pull_socket, unframe) - - -# this generator needs to know about the source_ids coming in via -# the poller, and need to yield DONE messages for each -# source_id.