Commit 58089c38 authored by Jonas Waeber's avatar Jonas Waeber
Browse files

Move headers

parent 32efc562
Pipeline #26217 passed with stages
in 2 minutes and 1 second
......@@ -139,14 +139,14 @@ class UpdateInstitution(Resource):
institution_data_de['attributes']['computed_teaser_image_url'],
'computed_teaser_color': institution_data_de['attributes']['computed_teaser_color'],
}
producer_topic = current_app.config['topic-drupal-export']
headers = [
('recordSetId', bytes('none', encoding='utf-8')),
('sessionId', bytes(str(uuid.uuid4()), encoding='utf-8')),
('institutionId', bytes(result.get('field_memobase_id'), encoding='utf-8')),
('isPublished', bytes(str(result['status']), encoding='utf-8'))
]
try:
producer_topic = current_app.config['topic-drupal-export']
headers = [
('recordSetId', bytes('none', encoding='utf-8')),
('sessionId', bytes(str(uuid.uuid4()), encoding='utf-8')),
('institutionId', bytes(result.get('field_memobase_id'), encoding='utf-8')),
('isPublished', bytes(str(result['status']), encoding='utf-8'))
]
key = bytes(result.get('field_memobase_id'), encoding='utf-8')
self.producer.send(producer_topic, result, key, headers=headers)
except Exception as ex:
......
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