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
b8a69cb2
Commit
b8a69cb2
authored
Jul 01, 2020
by
Lionel Walter
Browse files
Improve report messages
parent
960d4912
Pipeline
#10790
passed with stages
in 9 minutes and 15 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
import_api_app/models/Helm.py
View file @
b8a69cb2
...
...
@@ -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
:
...
...
import_api_app/models/Report.py
View file @
b8a69cb2
...
...
@@ -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
}
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