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
ce87a5c4
Commit
ce87a5c4
authored
Jan 03, 2020
by
lixiaofang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增类型
parent
bbfeae53
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
21 deletions
+14
-21
click_fun.py
click/views/click_fun.py
+3
-4
comment_fun.py
comment/views/comment_fun.py
+8
-12
follow_fun.py
follow/views/follow_fun.py
+3
-5
No files found.
click/views/click_fun.py
View file @
ce87a5c4
...
...
@@ -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
()
...
...
comment/views/comment_fun.py
View file @
ce87a5c4
...
...
@@ -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
)
...
...
follow/views/follow_fun.py
View file @
ce87a5c4
...
...
@@ -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
:
...
...
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