Skip to content

Commit

Permalink
refactor(postKafkaTimes): Use kafka_topic from args, don't duplicate it
Browse files Browse the repository at this point in the history
  • Loading branch information
Smejky338 committed Feb 14, 2024
1 parent a6fde9d commit 5420893
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions opl/post_kafka_times.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ def __init__(self, args, config, produce_here, save_here):
self.config = config
self.produce_here = produce_here
self.save_here = save_here
self.kafka_topic = args.kafka_topic
self.show_processed_messages = args.show_processed_messages
self.rate = args.rate

Expand Down Expand Up @@ -196,7 +195,7 @@ def wait_for_next_second(second=int(time.perf_counter())):
if self.show_processed_messages:
print(f"Producing {json.dumps(send_params, sort_keys=True)}")

future = self.produce_here.send(self.kafka_topic, **send_params)
future = self.produce_here.send(self.args.kafka_topic, **send_params)
future.add_callback(handle_send_success, message_id=message_id)
future.add_errback(handle_send_error, message_id=message_id)

Expand Down

0 comments on commit 5420893

Please sign in to comment.