Commit 21b3863b authored by 段英荣's avatar 段英荣

modify linucb

parent 7aeee446
...@@ -84,9 +84,11 @@ class CollectData(object): ...@@ -84,9 +84,11 @@ class CollectData(object):
logging.info(ori_msg) logging.info(ori_msg)
value_dict = json.loads(ori_msg.value) value_dict = json.loads(ori_msg.value)
if "@raw" in value_dict and "type" in value_dict["@raw"] and "on_click_feed_topic_card"==value_dict["@raw"]["type"]: if "@raw" in value_dict:
topic_id = value_dict["@raw"]["params"]["business_id"] raw_val_dict = json.loads(value_dict["@raw"])
device_id = value_dict["@raw"]["device"]["device_id"] if "type" in raw_val_dict and "on_click_feed_topic_card"==raw_val_dict["type"]:
topic_id = raw_val_dict["params"]["business_id"]
device_id = raw_val_dict["device"]["device_id"]
logging.info("consume topic_id:%s,device_id:%s" % (str(topic_id),str())) logging.info("consume topic_id:%s,device_id:%s" % (str(topic_id),str()))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment