Commit 74bea2fb authored by 李小芳's avatar 李小芳

Merge branch 'save_have_xiafa' into 'master'

add

See merge request !21
parents d905ca20 03e4210c
......@@ -117,6 +117,8 @@ def kafka_consum(topic_name=None):
# 调完接口后需要再次去拿新的push_time的时间
if is_success:
auto_comment_user(card_info)
else:
logging.info("这条数据将被paas:%s" % card_info)
elif action_type == "click": # 在这里去调点赞的接口
if 'have_click_number' in card_info:
......@@ -130,9 +132,11 @@ def kafka_consum(topic_name=None):
card_info["card_id"], is_success))
logging.info("当前卡片ID:%s,click2子函数消费处理耗时:%f" % (
card_info["card_id"], time.time() - begin))
if is_success:
auto_click_user(card_info)
else:
logging.info("这条数据将被paas:%s" % card_info)
elif action_type == "follow": # 在这里去调关注的接口
if 'have_follow_number' in card_info:
......@@ -149,6 +153,8 @@ def kafka_consum(topic_name=None):
card_info["card_id"], is_success))
if is_success:
auto_follow_user(card_info)
else:
logging.info("这条数据将被paas:%s" % card_info)
else: # push_time时间未到 需要等待
logging.info("follow [%s,%s,%s,%s],push_time未到,需要等待" % (
str(msg.topic), str(msg.partition), str(msg.offset), str(msg.key)))
......
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