From 31d1a6a713d177990609767d508209ced19ca396 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 2 Nov 2021 18:14:59 -0700 Subject: fmt (black): fatcat_tools/ --- python/fatcat_tools/kafka.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'python/fatcat_tools/kafka.py') diff --git a/python/fatcat_tools/kafka.py b/python/fatcat_tools/kafka.py index 32749db2..2a4451ad 100644 --- a/python/fatcat_tools/kafka.py +++ b/python/fatcat_tools/kafka.py @@ -1,4 +1,3 @@ - from confluent_kafka import KafkaException, Producer @@ -9,14 +8,15 @@ def kafka_fail_fast(err, msg): # TODO: should it be sys.exit(-1)? raise KafkaException(err) + def simple_kafka_producer(kafka_hosts): kafka_config = { - 'bootstrap.servers': kafka_hosts, - 'message.max.bytes': 20000000, # ~20 MBytes; broker-side max is ~50 MBytes - 'delivery.report.only.error': True, - 'default.topic.config': { - 'request.required.acks': -1, + "bootstrap.servers": kafka_hosts, + "message.max.bytes": 20000000, # ~20 MBytes; broker-side max is ~50 MBytes + "delivery.report.only.error": True, + "default.topic.config": { + "request.required.acks": -1, }, } return Producer(kafka_config) -- cgit v1.2.3