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
5aa7237f
Commit
5aa7237f
authored
Jan 02, 2020
by
lixiaofang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
去掉多余的判断
parent
9b2e6460
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
consum.py
moment/views/consum.py
+1
-1
No files found.
moment/views/consum.py
View file @
5aa7237f
...
@@ -34,7 +34,7 @@ def kafka_consum(topic_name=None):
...
@@ -34,7 +34,7 @@ def kafka_consum(topic_name=None):
# consumser_obj.seek(partition=TopicPartition(topic_name,int(partition_id.decode())),offset=int(topic_partition_info[partition_id]))
# consumser_obj.seek(partition=TopicPartition(topic_name,int(partition_id.decode())),offset=int(topic_partition_info[partition_id]))
while
True
:
while
True
:
begin
=
time
.
time
()
begin
=
time
.
time
()
msg_dict
=
consumser_obj
.
poll
(
timeout_ms
=
100
,
max_records
=
3
0
)
msg_dict
=
consumser_obj
.
poll
(
timeout_ms
=
100
,
max_records
=
5
0
)
for
msg_key
in
msg_dict
:
for
msg_key
in
msg_dict
:
consume_msg
=
msg_dict
[
msg_key
]
consume_msg
=
msg_dict
[
msg_key
]
for
msg
in
consume_msg
:
for
msg
in
consume_msg
:
...
...
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