From 16044d4d369ae8056e206c4306c6b2c05ac9baab Mon Sep 17 00:00:00 2001 From: Olivier MEDOC Date: Fri, 13 Jan 2017 14:54:43 +0100 Subject: [PATCH] pystemon-feeder: add the option bind in configuration file instead of address This is essentially because multiple feeds can be used in the address configuration variable. --- bin/feeder/pystemon-feeder.py | 6 +++++- bin/packages/config.cfg.sample | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/feeder/pystemon-feeder.py b/bin/feeder/pystemon-feeder.py index d36ed66f..770655bc 100755 --- a/bin/feeder/pystemon-feeder.py +++ b/bin/feeder/pystemon-feeder.py @@ -36,7 +36,11 @@ if not os.path.exists(configfile): cfg = ConfigParser.ConfigParser() cfg.read(configfile) -zmq_url = cfg.get("ZMQ_Global", "address") +if cfg.has_option("ZMQ_Global", "bind"): + zmq_url = cfg.get("ZMQ_Global", "bind") +else: + zmq_url = "tcp://127.0.0.1:5556" + pystemonpath = cfg.get("Directories", "pystemonpath") context = zmq.Context() diff --git a/bin/packages/config.cfg.sample b/bin/packages/config.cfg.sample index 79bd402b..f2e8285d 100644 --- a/bin/packages/config.cfg.sample +++ b/bin/packages/config.cfg.sample @@ -132,6 +132,7 @@ path = indexdir #address = tcp://crf.circl.lu:5556 address = tcp://127.0.0.1:5556 channel = 102 +bind = tcp://127.0.0.1:5556 [ZMQ_Url] address = tcp://127.0.0.1:5004