New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception on KeyboardInterrupt in kafka-python #1

Open
mmlac opened this Issue Sep 23, 2013 · 1 comment

Comments

Projects
None yet
2 participants
@mmlac
Owner

mmlac commented Sep 23, 2013

Not sure whether I have to fix it or this is caused on the kafka-python library.

run tail2kafka and then kill it with Control+C

^C
Process Process-1:
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
flushing remaining messages before shutdown
self.run()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/process.py", line 114, in run
self._target(_self._args, *_self._kwargs)
File "/Library/Python/2.7/site-packages/kafka/producer.py", line 92, in _send_upstream
partition, msg = queue.get(timeout=timeout)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/queues.py", line 129, in get
if not self._poll(block and (deadline-time.time()) or 0.0):
KeyboardInterrupt

@harelba

This comment has been minimized.

Show comment
Hide comment
@harelba

harelba Mar 22, 2014

Hi, I'm Harel, the writer of the original tail2kafka... Just noticed now that you forked my repo and that it's being actually used :)

Anyway, about this but, I believe that if you just try...except flush_messages() method code and fail silently in case of an exception, that would solve the issue. I vaguely remember a related issue with shutdown order.

Harel

harelba commented Mar 22, 2014

Hi, I'm Harel, the writer of the original tail2kafka... Just noticed now that you forked my repo and that it's being actually used :)

Anyway, about this but, I believe that if you just try...except flush_messages() method code and fail silently in case of an exception, that would solve the issue. I vaguely remember a related issue with shutdown order.

Harel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment