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
5a3dc63f
Commit
5a3dc63f
authored
Jan 10, 2020
by
李小芳
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'many_line' into 'master'
add See merge request
!24
parents
16c3e7df
3c924b5c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
process_time.py
moment/views/process_time.py
+5
-4
No files found.
moment/views/process_time.py
View file @
5a3dc63f
...
...
@@ -361,7 +361,7 @@ def judge_offset_partition_have_consum(card_info=None, offset=0, partition=0):
def
judge_data_have_in_redis
(
card_info
=
None
):
try
:
if
card_info
[
'
card_status
'
]
==
'comment'
:
if
card_info
[
'
action_type
'
]
==
'comment'
:
##在这里加一个判断 如果当前的评论的user_id和评论内容已经在这个评论下了就不再下发给同一个回答ID
key
=
'have_reply_answer_comment:'
+
str
(
card_info
[
'card_id'
])
redis_data
=
redis_client
.
hget
(
key
,
card_info
[
'current_user_id'
])
...
...
@@ -381,7 +381,7 @@ def judge_data_have_in_redis(card_info=None):
redis_client
.
hset
(
key
,
card_info
[
'current_user_id'
],
json
.
dumps
(
conent
))
return
True
elif
card_info
[
'
card_status
'
]
==
'follow'
:
elif
card_info
[
'
action_type
'
]
==
'follow'
:
key
=
'have_reply_answer_follow:'
+
str
(
card_info
[
'card_id'
])
redis_data
=
redis_client
.
get
(
key
)
...
...
@@ -401,7 +401,7 @@ def judge_data_have_in_redis(card_info=None):
redis_client
.
set
(
key
,
json
.
dumps
(
conent
))
return
True
el
se
:
el
if
card_info
[
'action_type'
]
==
'click'
:
key
=
'have_reply_answer_click:'
+
str
(
card_info
[
'card_id'
])
redis_data
=
redis_client
.
get
(
key
)
if
redis_data
:
...
...
@@ -420,7 +420,8 @@ def judge_data_have_in_redis(card_info=None):
redis_client
.
set
(
key
,
json
.
dumps
(
conent
))
return
True
else
:
pass
except
:
logging
.
error
(
"catch exception,err_msg:
%
s"
%
traceback
.
format_exc
())
return
False
...
...
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