Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
V
vest
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rank
vest
Commits
24aca437
Commit
24aca437
authored
Jan 20, 2020
by
lixiaofang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add log
parent
2d951fac
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
6 deletions
+12
-6
click_fun.py
click/views/click_fun.py
+4
-2
comment_fun.py
comment/views/comment_fun.py
+4
-2
follow_fun.py
follow/views/follow_fun.py
+4
-2
No files found.
click/views/click_fun.py
View file @
24aca437
...
...
@@ -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
...
...
comment/views/comment_fun.py
View file @
24aca437
...
...
@@ -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
:
...
...
follow/views/follow_fun.py
View file @
24aca437
...
...
@@ -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
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment