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
9a2fde92
Commit
9a2fde92
authored
Dec 30, 2019
by
李小芳
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'judge_status' into 'master'
Judge status See merge request
!7
parents
21b9cfbc
7a68df43
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
3 additions
and
3 deletions
+3
-3
click_fun.py
click/views/click_fun.py
+1
-1
comment_fun.py
comment/views/comment_fun.py
+1
-1
follow_fun.py
follow/views/follow_fun.py
+1
-1
__init__.cpython-36.pyc
libs/__pycache__/__init__.cpython-36.pyc
+0
-0
cache.cpython-36.pyc
libs/__pycache__/cache.cpython-36.pyc
+0
-0
error.cpython-36.pyc
libs/__pycache__/error.cpython-36.pyc
+0
-0
rpc.cpython-36.pyc
libs/__pycache__/rpc.cpython-36.pyc
+0
-0
No files found.
click/views/click_fun.py
View file @
9a2fde92
...
...
@@ -20,7 +20,7 @@ def click(card_info):
redis_data
=
{
"click"
:
1
,
"follow"
:
0
,
"comment"
:
0
}
redis_client
.
set
(
key
,
json
.
dumps
(
redis_data
))
redis_client
.
expire
(
key
,
time
=
24
*
60
*
60
)
logging
.
info
(
"get action:click,card_id:
%
s,redis_data:
%
s"
%
(
card_info
[
'id'
],
redis_data
))
logging
.
info
(
"get action:click,card_id:
%
s,redis_data:
%
s"
%
(
card_info
[
'
card_
id'
],
redis_data
))
click_num
=
redis_data
[
"click"
]
if
click_num
>
10
:
send_email_tome
(
str
(
redis_data
)
+
str
(
card_info
))
...
...
comment/views/comment_fun.py
View file @
9a2fde92
...
...
@@ -20,7 +20,7 @@ def comment(card_info):
redis_data
=
{
"click"
:
0
,
"follow"
:
0
,
"comment"
:
1
}
redis_client
.
set
(
key
,
json
.
dumps
(
redis_data
))
redis_client
.
expire
(
key
,
time
=
24
*
60
*
60
)
logging
.
info
(
"get action:comment,card_id:
%
s,redis_data:
%
s"
%
(
card_info
[
'id'
],
redis_data
))
logging
.
info
(
"get action:comment,card_id:
%
s,redis_data:
%
s"
%
(
card_info
[
'
card_
id'
],
redis_data
))
comment_num
=
redis_data
[
"comment"
]
####在这里做判断 一天不能超过20个 如果超过二十个不下发 不超过二十个下发对应的灌水功能
if
comment_num
>
20
:
...
...
follow/views/follow_fun.py
View file @
9a2fde92
...
...
@@ -20,7 +20,7 @@ def follow(card_info):
redis_data
=
{
"click"
:
0
,
"follow"
:
1
,
"comment"
:
0
}
redis_client
.
set
(
key
,
json
.
dumps
(
redis_data
))
redis_client
.
expire
(
key
,
time
=
24
*
60
*
60
)
logging
.
info
(
"get action:follow,card_id:
%
s,redis_data:
%
s"
%
(
card_info
[
'id'
],
redis_data
))
logging
.
info
(
"get action:follow,card_id:
%
s,redis_data:
%
s"
%
(
card_info
[
'
card_
id'
],
redis_data
))
follow_num
=
redis_data
[
"follow"
]
...
...
libs/__pycache__/__init__.cpython-36.pyc
deleted
100644 → 0
View file @
21b9cfbc
File deleted
libs/__pycache__/cache.cpython-36.pyc
deleted
100644 → 0
View file @
21b9cfbc
File deleted
libs/__pycache__/error.cpython-36.pyc
deleted
100644 → 0
View file @
21b9cfbc
File deleted
libs/__pycache__/rpc.cpython-36.pyc
deleted
100644 → 0
View file @
21b9cfbc
File deleted
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