Added communicators

This commit is contained in:
2020-05-08 21:48:32 +02:00
parent 8668550a3f
commit 77e915c63e
3 changed files with 63 additions and 57 deletions

View File

@@ -24,16 +24,16 @@ class RedisSuperStorage:
return list_of_customers
def get_producer_list(self) -> list:
def get_producer_list(self) -> dict:
keys = self.r.keys('producer_*')
list_of_producer_ip = []
list_of_producer_ip = {}
for key in keys:
ip = (self.r.get(key) or b"").decode('utf-8')
if ip:
list_of_producer_ip.append(ip)
list_of_producer_ip[key.decode('utf-8')] = ip
return list_of_producer_ip