From 53b4111c5975890a3e1404cd14b6ec4700fe56f8 Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Wed, 30 Oct 2013 16:04:45 +0100 Subject: [PATCH] Make collector bind instead of retriever --- collect.py | 2 +- retrieve.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/collect.py b/collect.py index bf184f6..a4da229 100644 --- a/collect.py +++ b/collect.py @@ -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") diff --git a/retrieve.py b/retrieve.py index 5fdeaef..92438ae 100644 --- a/retrieve.py +++ b/retrieve.py @@ -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())