Make collector bind instead of retriever

develop
Sven Slootweg 11 years ago
parent 8a079d7090
commit 53b4111c59

@ -2,7 +2,7 @@ import zmq, msgpack, json, os, time
context = zmq.Context()
socket = context.socket(zmq.PULL)
socket.connect("ipc:///tmp/pbscrape-results")
socket.bind("ipc:///tmp/pbscrape-results")
try:
os.makedirs("pastes")

@ -4,7 +4,7 @@ context = zmq.Context()
receiver = context.socket(zmq.PULL)
receiver.connect("ipc:///tmp/pbscrape-tasks")
sender = context.socket(zmq.PUSH)
sender.bind("ipc:///tmp/pbscrape-results")
sender.connect("ipc:///tmp/pbscrape-results")
while True:
item = msgpack.unpackb(receiver.recv())

Loading…
Cancel
Save