From 49f45afaaaa5df562523e23f03780f2db4f825cb Mon Sep 17 00:00:00 2001 From: wuaho Date: Tue, 6 Jul 2021 10:54:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=89=E9=9C=B8=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- v2/consumer.py | 2 +- v2/event_attr.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/v2/consumer.py b/v2/consumer.py index 25e993c..747cef4 100644 --- a/v2/consumer.py +++ b/v2/consumer.py @@ -17,7 +17,7 @@ def create_consumer(partition=-1): # print(msg) topic = msg.topic val = msg.value - if val.get('owner_name') not in ('gmhdgdt', 'gmhdtt'): + if val.get('properties',{}).get('owner_name') not in ('gmhdgdt', 'gmhdtt'): continue yield topic, val diff --git a/v2/event_attr.py b/v2/event_attr.py index aa2c4c6..72a4477 100644 --- a/v2/event_attr.py +++ b/v2/event_attr.py @@ -11,7 +11,7 @@ class EventAttr: attr = self.event_attr.get(key) if not attr: self.event_attr[key] = self.rdb.smembers(key) or set() - return self.event_attr[key] + return set(self.event_attr[key]) def set_event_attr(self, key, *data): self.rdb.sadd(key, *data)