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
d905ca20
Commit
d905ca20
authored
Jan 09, 2020
by
李小芳
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'save_have_xiafa' into 'master'
add See merge request
!20
parents
b14a020c
abfa6540
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
consum.py
moment/views/consum.py
+6
-6
No files found.
moment/views/consum.py
View file @
d905ca20
...
...
@@ -115,8 +115,8 @@ def kafka_consum(topic_name=None):
logging
.
info
(
"当前卡片ID:
%
s,comment2子函数消费处理耗时:
%
f"
%
(
card_info
[
'card_id'
],
time
.
time
()
-
begin
))
# 调完接口后需要再次去拿新的push_time的时间
if
is_success
:
auto_comment_user
(
card_info
)
if
is_success
:
auto_comment_user
(
card_info
)
elif
action_type
==
"click"
:
# 在这里去调点赞的接口
if
'have_click_number'
in
card_info
:
...
...
@@ -131,8 +131,8 @@ def kafka_consum(topic_name=None):
logging
.
info
(
"当前卡片ID:
%
s,click2子函数消费处理耗时:
%
f"
%
(
card_info
[
"card_id"
],
time
.
time
()
-
begin
))
if
is_success
:
auto_click_user
(
card_info
)
if
is_success
:
auto_click_user
(
card_info
)
elif
action_type
==
"follow"
:
# 在这里去调关注的接口
if
'have_follow_number'
in
card_info
:
...
...
@@ -147,8 +147,8 @@ def kafka_consum(topic_name=None):
str
(
msg
.
topic
),
str
(
msg
.
partition
),
str
(
msg
.
offset
),
str
(
msg
.
key
),
card_info
[
"card_id"
],
is_success
))
if
is_success
:
auto_follow_user
(
card_info
)
if
is_success
:
auto_follow_user
(
card_info
)
else
:
# push_time时间未到 需要等待
logging
.
info
(
"follow [
%
s,
%
s,
%
s,
%
s],push_time未到,需要等待"
%
(
str
(
msg
.
topic
),
str
(
msg
.
partition
),
str
(
msg
.
offset
),
str
(
msg
.
key
)))
...
...
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