Commit 24aca437 authored by lixiaofang's avatar lixiaofang

add log

parent 2d951fac
......@@ -3,7 +3,7 @@ import traceback
from libs.error import logging_exception
import logging
from libs.cache import redis_client
import json
import json, time
from moment.views.send_email import send_email_tome
from moment.views.process_time import get_vest_userid
import datetime
......@@ -50,10 +50,12 @@ def click(card_info):
rpc_invoker = get_rpc_invoker()
try:
begin = time.time()
current_user_id = get_vest_userid(need_comment_num=1)[0]
status = rpc_invoker['qa/irrigation/create_answer_vote'](user_id=current_user_id,
answer_id=card_info['card_id']).unwrap()
logging.info('get_create_answer_vote_status:%s,card_id:%s' % (status, card_info['card_id']))
logging.info('get_create_answer_vote_status:%s,card_id:%s,耗时:%s' % (
status, card_info['card_id'], time.time() - begin))
error = status.get('error', 1)
if error == 0:
return True
......
......@@ -3,7 +3,7 @@ import traceback
from libs.error import logging_exception
import logging
from libs.cache import redis_client
import json
import json, time
from moment.views.send_email import send_email_tome
import datetime
from moment.views.process_time import get_vest_userid_and_comment, get_vest_userid
......@@ -144,12 +144,14 @@ def comment(card_info):
rpc_invoker = get_rpc_invoker()
try:
begin = time.time()
current_user_id = get_vest_userid(need_comment_num=1)[0]
status = rpc_invoker['qa/irrigation/create_answer_reply'](user_id=current_user_id,
answer_id=card_info['card_id'],
content=card_info[
'comment_content']).unwrap()
logging.info('get_create_answer_reply_status:%s,card_id:%s' % (status, card_info['card_id']))
logging.info('get_create_answer_reply_status:%s,card_id:%s,耗时:%s' % (
status, card_info['card_id'], time.time() - begin))
error = status.get('error', 1)
if error == 0:
......
......@@ -3,7 +3,7 @@ import traceback
from libs.error import logging_exception
import logging
from libs.cache import redis_client
import json
import json, time
from moment.views.send_email import send_email_tome
from moment.views.process_time import get_vest_userid
import datetime
......@@ -50,11 +50,13 @@ def follow(card_info):
rpc_invoker = get_rpc_invoker()
try:
begin = time.time()
current_user_id = get_vest_userid(need_comment_num=1)[0]
status = rpc_invoker['api/irrigation/user_add_follow'](follow_user_id=current_user_id,
followed_user_id=card_info[
'card_user_id']).unwrap()
logging.info('get_user_add_follow_status:%s,card_id:%s' % (status, card_info['card_id']))
logging.info(
'get_user_add_follow_status:%s,card_id:%s,耗时:%s' % (status, card_info['card_id'], time.time() - begin))
error = status.get('error', 1)
if error == 0:
......
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