Commit 18e654ac authored by Matthias's avatar Matthias
Browse files

encode json in utf-8, not ascii

parent 5412ef2b
Pipeline #11227 passed with stages
in 6 minutes and 32 seconds
......@@ -60,10 +60,10 @@ class MonitorDrupalJsonApiInstitution(Resource):
report += 'Exception' + str(ex) + '\n'
# 2. write info into kafka topic
# use kafka-producer and topic 'drupal-json-api-institutions'
try:
producer = KafkaProducer(bootstrap_servers=current_app.config['kafka-broker-url'],
value_serializer=lambda m: json.dumps(m).encode('ascii'))
value_serializer=lambda m: json.dumps(m, ensure_ascii=False)
.encode('utf-8'))
producer.send('drupal-json-api-institutions', topicValue)
except AssertionError as ex:
report += 'Exception' + str(ex) + '\n'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment