mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-22 22:27:17 +00:00
fix: [Module Queue] module without subscriber
This commit is contained in:
parent
3bf4254308
commit
9ae21171cc
2 changed files with 6 additions and 4 deletions
|
@ -150,8 +150,11 @@ class Process(object):
|
||||||
|
|
||||||
def populate_set_in(self):
|
def populate_set_in(self):
|
||||||
# monoproc
|
# monoproc
|
||||||
src = self.modules.get(self.subscriber_name, 'subscribe')
|
try:
|
||||||
if src != 'Redis':
|
src = self.modules.get(self.subscriber_name, 'subscribe')
|
||||||
|
except configparser.NoOptionError: #NoSectionError
|
||||||
|
src = None
|
||||||
|
if src != 'Redis' and src:
|
||||||
self.pubsub.setup_subscribe(src)
|
self.pubsub.setup_subscribe(src)
|
||||||
for msg in self.pubsub.subscribe():
|
for msg in self.pubsub.subscribe():
|
||||||
in_set = self.subscriber_name + 'in'
|
in_set = self.subscriber_name + 'in'
|
||||||
|
@ -159,7 +162,7 @@ class Process(object):
|
||||||
self.r_temp.hset('queues', self.subscriber_name,
|
self.r_temp.hset('queues', self.subscriber_name,
|
||||||
int(self.r_temp.scard(in_set)))
|
int(self.r_temp.scard(in_set)))
|
||||||
else:
|
else:
|
||||||
print('{} has no suscriber'.format(self.subscriber_name))
|
print('{} has no subscriber'.format(self.subscriber_name))
|
||||||
|
|
||||||
def get_from_set(self):
|
def get_from_set(self):
|
||||||
# multiproc
|
# multiproc
|
||||||
|
|
|
@ -3,7 +3,6 @@ subscribe = ZMQ_Global
|
||||||
publish = Redis_Mixer,Redis_preProcess1
|
publish = Redis_Mixer,Redis_preProcess1
|
||||||
|
|
||||||
[Importer_Json]
|
[Importer_Json]
|
||||||
subscribe = ZMQ_JSON
|
|
||||||
publish = Redis_Mixer,Redis_Tags
|
publish = Redis_Mixer,Redis_Tags
|
||||||
|
|
||||||
[Global]
|
[Global]
|
||||||
|
|
Loading…
Reference in a new issue