Skip to content
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

[utils/kafka] provide some exit code from main #7584

Merged
merged 5 commits into from
Nov 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions utils/kafka/consume.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def main():
pprint(client.poll(10000))
client.unsubscribe()
client.close()
return 0


if __name__ == "__main__":
Expand Down
1 change: 1 addition & 0 deletions utils/kafka/manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ def main():
print(client.delete_topics(args.delete))

client.close()
return 0


if __name__ == "__main__":
Expand Down
1 change: 1 addition & 0 deletions utils/kafka/produce.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ def send(num):

client.flush()
client.close()
return 0


if __name__ == "__main__":
Expand Down
2 changes: 1 addition & 1 deletion utils/kafka/status.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import kafka # … kafka-python

import argparse
from pprint import pprint


def main():
Expand Down Expand Up @@ -46,6 +45,7 @@ def main():
consumer.close()

client.close()
return 0


if __name__ == "__main__":
Expand Down