Commit b8a69cb2 authored by Lionel Walter's avatar Lionel Walter
Browse files

Improve report messages

parent 960d4912
Pipeline #10790 passed with stages
in 9 minutes and 15 seconds
......@@ -24,7 +24,7 @@ def start(process_id, job_name, job_parameters):
if output.returncode == 0:
return {
'status': 'SUCCESS',
'message': message,
'message': 'Job successfully started',
'job_id': helm_name
}, 201
else:
......
......@@ -45,7 +45,7 @@ def get_report(topic_name):
# one message in the topic somehow
except UnboundLocalError:
if 'text-file-validation' in topic_name:
report = 'text-file-validation-report-bug-with-checker'
report = 'File correctly loaded (this needs to be checked more carefully)'
current_app.logger.debug("Report: " + report)
return {
'status': 'SUCCESS',
......@@ -64,10 +64,18 @@ def get_report(topic_name):
'report': report
}
else:
report_header = str(processed) + ' records processed\r\n'
report_header += str(succeeded) + ' successful\r\n'
current_app.logger.debug("Report: " + report_header+report)
return {
'status': 'FAILURE',
'report': report_header+report
}
if 'text-file-validation' in topic_name:
report = 'Impossible to load the file(s) from the SFTP server'
current_app.logger.debug("Report: " + report)
return {
'status': 'SUCCESS',
'report': report
}
else:
report_header = str(processed) + ' records processed\r\n'
report_header += str(succeeded) + ' successful\r\n'
current_app.logger.debug("Report: " + report_header+report)
return {
'status': 'FAILURE',
'report': report_header+report
}
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