Commit 1f863bc3 authored by Matthias's avatar Matthias
Browse files

handle non existing transform-files

parent 2eaa40db
Pipeline #24329 passed with stages
in 2 minutes and 34 seconds
......@@ -54,7 +54,7 @@ class FetchMappingFile(Resource):
# user = 'mb_sftp'
# pwd = '***'
fileContentsMapping = ''
fileContentsTranform = ''
fileContentsTransform = ''
fileContentsLocalTransform = ''
try:
......@@ -74,7 +74,7 @@ class FetchMappingFile(Resource):
if fileName == 'mapping.yml':
fileContentsMapping = remote_file.read()
if fileName == 'transform.xslt':
fileContentsTranform = remote_file.read()
fileContentsTransform = remote_file.read()
if fileName == 'localTransforms.yml':
fileContentsLocalTransform = remote_file.read()
except IOError:
......@@ -94,8 +94,10 @@ class FetchMappingFile(Resource):
key_serializer=str.encode)
key = recordset_id + '#'
producer.send(topic, key=key + 'mapping', value=fileContentsMapping)
producer.send(topic, key=key + 'transform', value=fileContentsTranform)
producer.send(topic, key=key + 'localTransform', value=fileContentsLocalTransform)
if "" != fileContentsTransform:
producer.send(topic, key=key + 'transform', value=fileContentsTransform)
if "" != fileContentsLocalTransform:
producer.send(topic, key=key + 'localTransform', value=fileContentsLocalTransform)
except Exception as ex:
message = str(ex)
current_app.logger.debug(message)
......
Supports Markdown
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