Fixed redisconnector's currentconsumer handling

This commit is contained in:
Scharnitzky Donát 2020-04-21 20:30:03 +02:00
parent de4c2ca6fb
commit 010e0d708f

View File

@ -48,7 +48,7 @@ class RedisConnector:
Gets currently active consumer. Gets currently active consumer.
:return: :return:
""" """
return self.redisconnection.get('currentConsumer') return json.loads(self.redisconnection.get('currentConsumer'))
def set_currentconsumer(self, currentconsumer): def set_currentconsumer(self, currentconsumer):
""" """
@ -56,7 +56,8 @@ class RedisConnector:
:param currentconsumer: :param currentconsumer:
:return: :return:
""" """
self.redisconnection.set('currentConsumer', currentconsumer) json_dict = json.dumps(currentconsumer)
self.redisconnection.set('currentConsumer', json_dict)
consumerlist = property(get_consumerlist, set_consumerlist) consumerlist = property(get_consumerlist, set_consumerlist)
currentconsumer = property(get_currentconsumer, set_currentconsumer) currentconsumer = property(get_currentconsumer, set_currentconsumer)