Commit 5a3dc63f authored by 李小芳's avatar 李小芳

Merge branch 'many_line' into 'master'

add

See merge request !24
parents 16c3e7df 3c924b5c
......@@ -361,7 +361,7 @@ def judge_offset_partition_have_consum(card_info=None, offset=0, partition=0):
def judge_data_have_in_redis(card_info=None):
try:
if card_info['card_status'] == 'comment':
if card_info['action_type'] == 'comment':
##在这里加一个判断 如果当前的评论的user_id和评论内容已经在这个评论下了就不再下发给同一个回答ID
key = 'have_reply_answer_comment:' + str(card_info['card_id'])
redis_data = redis_client.hget(key, card_info['current_user_id'])
......@@ -381,7 +381,7 @@ def judge_data_have_in_redis(card_info=None):
redis_client.hset(key, card_info['current_user_id'], json.dumps(conent))
return True
elif card_info['card_status'] == 'follow':
elif card_info['action_type'] == 'follow':
key = 'have_reply_answer_follow:' + str(card_info['card_id'])
redis_data = redis_client.get(key)
......@@ -401,7 +401,7 @@ def judge_data_have_in_redis(card_info=None):
redis_client.set(key, json.dumps(conent))
return True
else:
elif card_info['action_type'] == 'click':
key = 'have_reply_answer_click:' + str(card_info['card_id'])
redis_data = redis_client.get(key)
if redis_data:
......@@ -420,7 +420,8 @@ def judge_data_have_in_redis(card_info=None):
redis_client.set(key, json.dumps(conent))
return True
else:
pass
except:
logging.error("catch exception,err_msg:%s" % traceback.format_exc())
return False
......
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