Commit 7cb58edd authored by lixiaofang's avatar lixiaofang

kafka

parent f1c5e06b
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="PyPackageRequirementsInspection" enabled="true" level="WARNING" enabled_by_default="true">
<option name="ignoredPackages">
<value>
<list size="2">
<item index="0" class="java.lang.String" itemvalue="gm-rpcd" />
<item index="1" class="java.lang.String" itemvalue="gunicorn" />
</list>
</value>
</option>
</inspection_tool>
</profile>
</component>
\ No newline at end of file
......@@ -19,18 +19,30 @@ def vest_irrigation(card_id=0, card_type=None, card_user_id=None, create_time=""
logging.info("------------------------")
topic = settings.KAFKA_TOPIC_NAME
comment_msg_dict = {
"card_id": card_id,
"card_type": "auto_vest",
"create_time": create_time,
"content_level": content_level,
"tag_names": tag_names,
"type": "get_write_answer_userinfo",
"current_push_time": create_time,
'action_type': 'comment'
}
producer.send(topic, json.dumps(comment_msg_dict).encode())
tag_list = ["瘦脸针kyc", "双眼皮kyc", "水光针kyc", "玻尿酸kyc", "吸脂kyc", "埋线提升kyc", "鼻综合kyc", "光子嫩肤kyc", "没有想法kyc",
"牙齿kyc", "抗衰紧致kyc", "胸部kyc"]
flag = False
if len(tag_names) > 0:
for i in tag_names:
if i in tag_list:
flag = True
if flag == True:
comment_msg_dict = {
"card_id": card_id,
"card_type": "auto_vest",
"create_time": create_time,
"content_level": content_level,
"tag_names": tag_names,
"type": "get_write_answer_userinfo",
"current_push_time": create_time,
'action_type': 'comment'
}
logging.info("get card_info:%s" % comment_msg_dict)
producer.send(topic, json.dumps(comment_msg_dict).encode())
follow_msg_dict = {
"card_id": card_id,
......
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