Commit cdb46607 authored by lixiaofang's avatar lixiaofang

修改配置

parent 7cb63038
...@@ -14,7 +14,10 @@ import logging ...@@ -14,7 +14,10 @@ import logging
@bind('vest/moment/vest_irrigation') @bind('vest/moment/vest_irrigation')
def vest_irrigation(card_id=0, card_type=None, card_user_id=None, create_time="", content_level=0, tag_names=[]): def vest_irrigation(card_id=0, card_type=None, card_user_id=None, create_time="", content_level=0, tag_names=[]):
try: try:
producer = KafkaProducer(bootstrap_servers=[settings.KAFKA_BROKER_LIST]) producer = KafkaProducer(bootstrap_servers=[settings.KAFKA_BROKER_LIST])
logging.info("------------------------")
topic = settings.KAFKA_TOPIC_NAME topic = settings.KAFKA_TOPIC_NAME
comment_msg_dict = { comment_msg_dict = {
"card_id": card_id, "card_id": card_id,
...@@ -57,6 +60,7 @@ def vest_irrigation(card_id=0, card_type=None, card_user_id=None, create_time="" ...@@ -57,6 +60,7 @@ def vest_irrigation(card_id=0, card_type=None, card_user_id=None, create_time=""
producer.send(topic, json.dumps(click_msg_dict).encode()) producer.send(topic, json.dumps(click_msg_dict).encode())
producer.close() producer.close()
logging.info("------------------------")
except: except:
logging.error("catch exception,err_msg:%s" % traceback.format_exc()) logging.error("catch exception,err_msg:%s" % traceback.format_exc())
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