Commit bb0ad311 authored by Klaus Wölfel's avatar Klaus Wölfel

Add ompatibility with old ingestion. Must be dropped before merging.

parent 60f581c0
...@@ -60,8 +60,6 @@ class IngestionPolicy(Folder): ...@@ -60,8 +60,6 @@ class IngestionPolicy(Folder):
if self.REQUEST.method != 'POST': if self.REQUEST.method != 'POST':
raise BadRequest('Only POST request is allowed.') raise BadRequest('Only POST request is allowed.')
reference = self.REQUEST.get('reference')
data_chunk = self.REQUEST.get('data_chunk')
tag_parsing_script_id = self.getScriptId() tag_parsing_script_id = self.getScriptId()
if tag_parsing_script_id is None: if tag_parsing_script_id is None:
...@@ -71,6 +69,14 @@ class IngestionPolicy(Folder): ...@@ -71,6 +69,14 @@ class IngestionPolicy(Folder):
if tag_parsing_script is None: if tag_parsing_script is None:
raise NotFound('No tag parsing script found.') raise NotFound('No tag parsing script found.')
# XXX Compatibility with old ingestion. Must be dropped before merging
# with wendelin master
if tag_parsing_script_id == "ERP5Site_handleDefaultFluentdIngestion":
return tag_parsing_script(**kw)
reference = self.REQUEST.get('reference')
data_chunk = self.REQUEST.get('data_chunk')
# the script parses the fluentd tag (reference) and returns a dictionary # the script parses the fluentd tag (reference) and returns a dictionary
# which describes the ingestion movement. Then we use this dictionary to # which describes the ingestion movement. Then we use this dictionary to
# search for an existing movement and if we do not find one, we create # search for an existing movement and if we do not find one, we create
......
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