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
74bea2fb
Commit
74bea2fb
authored
Jan 09, 2020
by
李小芳
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'save_have_xiafa' into 'master'
add See merge request
!21
parents
d905ca20
03e4210c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
consum.py
moment/views/consum.py
+7
-1
No files found.
moment/views/consum.py
View file @
74bea2fb
...
...
@@ -117,6 +117,8 @@ def kafka_consum(topic_name=None):
# 调完接口后需要再次去拿新的push_time的时间
if
is_success
:
auto_comment_user
(
card_info
)
else
:
logging
.
info
(
"这条数据将被paas:
%
s"
%
card_info
)
elif
action_type
==
"click"
:
# 在这里去调点赞的接口
if
'have_click_number'
in
card_info
:
...
...
@@ -130,9 +132,11 @@ def kafka_consum(topic_name=None):
card_info
[
"card_id"
],
is_success
))
logging
.
info
(
"当前卡片ID:
%
s,click2子函数消费处理耗时:
%
f"
%
(
card_info
[
"card_id"
],
time
.
time
()
-
begin
))
if
is_success
:
auto_click_user
(
card_info
)
else
:
logging
.
info
(
"这条数据将被paas:
%
s"
%
card_info
)
elif
action_type
==
"follow"
:
# 在这里去调关注的接口
if
'have_follow_number'
in
card_info
:
...
...
@@ -149,6 +153,8 @@ def kafka_consum(topic_name=None):
card_info
[
"card_id"
],
is_success
))
if
is_success
:
auto_follow_user
(
card_info
)
else
:
logging
.
info
(
"这条数据将被paas:
%
s"
%
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