Commit dcf40748 authored by lixiaofang's avatar lixiaofang

暂时去掉需要判断offset的接口

parent 23735430
...@@ -32,12 +32,16 @@ def click(card_info): ...@@ -32,12 +32,16 @@ def click(card_info):
if click_num > 10: if click_num > 10:
logging.info("今天已经消费到最大次数了,不能再消费") logging.info("今天已经消费到最大次数了,不能再消费")
# send_email_tome(str(redis_data) + str(card_info))
else: else:
rpc_invoker = get_rpc_invoker() rpc_invoker = get_rpc_invoker()
status = rpc_invoker['qa/irrigation/create_answer_vote'](user_id=card_info['current_user_id'], try:
answer_id=card_info['card_id']).unwrap() rpc_invoker['qa/irrigation/create_answer_vote'](user_id=card_info['current_user_id'],
return True answer_id=card_info['card_id']).unwrap()
return True
except:
logging_exception()
logging.error("catch exception,err_msg:%s" % traceback.format_exc())
return False
except: except:
logging_exception() logging_exception()
logging.error("catch exception,err_msg:%s" % traceback.format_exc()) logging.error("catch exception,err_msg:%s" % traceback.format_exc())
......
...@@ -38,7 +38,7 @@ def comment(card_info): ...@@ -38,7 +38,7 @@ def comment(card_info):
####在这里做判断 一天不能超过12个 如果超过二十个不下发 不超过二十个下发对应的灌水功能 ####在这里做判断 一天不能超过12个 如果超过二十个不下发 不超过二十个下发对应的灌水功能
if comment_num > 12: if comment_num > 12:
return True logging.info("今天已经消费到最大次数了,不能再消费")
else: else:
try: try:
rpc_invoker = get_rpc_invoker() rpc_invoker = get_rpc_invoker()
...@@ -71,7 +71,7 @@ def comment(card_info): ...@@ -71,7 +71,7 @@ def comment(card_info):
####在这里做判断 一天不能超过12个 如果超过十二个不下发 不超过 十二个下发对应的灌水功能 ####在这里做判断 一天不能超过12个 如果超过十二个不下发 不超过 十二个下发对应的灌水功能
if comment_num > 12: if comment_num > 12:
return True logging.info("今天已经消费到最大次数了,不能再消费")
else: else:
try: try:
rpc_invoker = get_rpc_invoker() rpc_invoker = get_rpc_invoker()
...@@ -108,7 +108,7 @@ def comment(card_info): ...@@ -108,7 +108,7 @@ def comment(card_info):
####在这里做判断 一天不能超过12个 如果超过二十个不下发 不超过二十个下发对应的灌水功能 ####在这里做判断 一天不能超过12个 如果超过二十个不下发 不超过二十个下发对应的灌水功能
if comment_num > 12: if comment_num > 12:
return True logging.info("今天已经消费到最大次数了,不能再消费")
else: else:
rpc_invoker = get_rpc_invoker() rpc_invoker = get_rpc_invoker()
try: try:
......
...@@ -29,13 +29,15 @@ def follow(card_info): ...@@ -29,13 +29,15 @@ def follow(card_info):
if follow_num > 10: if follow_num > 10:
logging.info("今天已经消费到最大次数了,不能再消费") logging.info("今天已经消费到最大次数了,不能再消费")
# send_email_tome(str(redis_data) + str(card_info))
else: else:
rpc_invoker = get_rpc_invoker() rpc_invoker = get_rpc_invoker()
status = rpc_invoker['api/irrigation/user_add_follow'](follow_user_id=card_info['current_user_id'], try:
followed_user_id=card_info['card_user_id']).unwrap() rpc_invoker['api/irrigation/user_add_follow'](follow_user_id=card_info['current_user_id'],
followed_user_id=card_info['card_user_id']).unwrap()
return True return True
except:
logging.error("catch exception,err_msg:%s" % traceback.format_exc())
return False
except: except:
logging_exception() logging_exception()
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