From 9ae21171cca2e72203c7c654e3bce4c52e21e1da Mon Sep 17 00:00:00 2001 From: Terrtia Date: Tue, 23 Feb 2021 15:05:00 +0100 Subject: [PATCH] fix: [Module Queue] module without subscriber --- bin/Helper.py | 9 ++++++--- bin/packages/modules.cfg | 1 - 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/bin/Helper.py b/bin/Helper.py index 31eb20e9..b23132f7 100755 --- a/bin/Helper.py +++ b/bin/Helper.py @@ -150,8 +150,11 @@ class Process(object): def populate_set_in(self): # monoproc - src = self.modules.get(self.subscriber_name, 'subscribe') - if src != 'Redis': + try: + src = self.modules.get(self.subscriber_name, 'subscribe') + except configparser.NoOptionError: #NoSectionError + src = None + if src != 'Redis' and src: self.pubsub.setup_subscribe(src) for msg in self.pubsub.subscribe(): in_set = self.subscriber_name + 'in' @@ -159,7 +162,7 @@ class Process(object): self.r_temp.hset('queues', self.subscriber_name, int(self.r_temp.scard(in_set))) else: - print('{} has no suscriber'.format(self.subscriber_name)) + print('{} has no subscriber'.format(self.subscriber_name)) def get_from_set(self): # multiproc diff --git a/bin/packages/modules.cfg b/bin/packages/modules.cfg index ed3c466e..302b68af 100644 --- a/bin/packages/modules.cfg +++ b/bin/packages/modules.cfg @@ -3,7 +3,6 @@ subscribe = ZMQ_Global publish = Redis_Mixer,Redis_preProcess1 [Importer_Json] -subscribe = ZMQ_JSON publish = Redis_Mixer,Redis_Tags [Global]