Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
memoriav
Memobase 2020
services
Import Process
Import API
Commits
58089c38
Commit
58089c38
authored
May 11, 2021
by
Jonas Waeber
Browse files
Move headers
parent
32efc562
Pipeline
#26217
passed with stages
in 2 minutes and 1 second
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
import_api_app/resources/UpdateInstitution.py
View file @
58089c38
...
...
@@ -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
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment