Commit ce87a5c4 authored by lixiaofang's avatar lixiaofang

新增类型

parent bbfeae53
......@@ -34,10 +34,9 @@ def click(card_info):
return True
# send_email_tome(str(redis_data) + str(card_info))
else:
print("goodgoodgood")
# rpc_invoker = get_rpc_invoker()
# rpc_invoker['qa/irrigation/create_answer_vote'](user_id=card_info['current_user_id'],
# answer_id=card_info['card_id']).unwrap()
rpc_invoker = get_rpc_invoker()
rpc_invoker['qa/irrigation/create_answer_vote'](user_id=card_info['current_user_id'],
answer_id=card_info['card_id']).unwrap()
return True
except:
logging_exception()
......
......@@ -40,12 +40,10 @@ def comment(card_info):
return True
# send_email_tome(str(redis_data) + str(card_info))
else:
print("tractate")
# rpc_invoker = get_rpc_invoker()
# rpc_invoker['qa/irrigation/create_answer_reply'](user_id=card_info['current_user_id'],
# answer_id=card_info['card_id'],
# content=card_info['comment_content']).unwrap()
rpc_invoker = get_rpc_invoker()
rpc_invoker['qa/irrigation/create_answer_reply'](user_id=card_info['current_user_id'],
answer_id=card_info['card_id'],
content=card_info['comment_content']).unwrap()
elif card_info['card_status'] == 'diary':
today = datetime.datetime.now()
......@@ -72,12 +70,10 @@ def comment(card_info):
# send_email_tome(str(redis_data) + str(card_info))
else:
print("diary")
# rpc_invoker = get_rpc_invoker()
# rpc_invoker['qa/irrigation/create_answer_reply'](user_id=card_info['current_user_id'],
# answer_id=card_info['card_id'],
# content=card_info['comment_content']).unwrap()
rpc_invoker = get_rpc_invoker()
rpc_invoker['qa/irrigation/create_answer_reply'](user_id=card_info['current_user_id'],
answer_id=card_info['card_id'],
content=card_info['comment_content']).unwrap()
else:
today = datetime.datetime.now()
str_today = str(today.year) + str(today.month) + str(today.day)
......
......@@ -31,11 +31,9 @@ def follow(card_info):
return True
# send_email_tome(str(redis_data) + str(card_info))
else:
print("goodgoodgood")
# rpc_invoker = get_rpc_invoker()
# rpc_invoker['api/irrigation/user_add_follow'](follow_user_id=card_info['current_user_id'],
# followed_user_id=card_info['card_user_id']).unwrap()
rpc_invoker = get_rpc_invoker()
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
except:
......
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