kafka-json-producer_3.py 204 B

12345678910111213141516
  1. def main():
  2. tasks = [
  3. Producer(),
  4. ]
  5. for t in tasks:
  6. t.start()
  7. time.sleep(10)
  8. for task in tasks:
  9. task.stop()
  10. for task in tasks:
  11. task.join()