Skip to content
GitLab
Menu
Projects
Groups
Snippets
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
46d6376b
Commit
46d6376b
authored
Jun 15, 2020
by
Lionel Walter
Browse files
Use snake case instead of camel case
parent
3f31e332
Pipeline
#10126
passed with stages
in 9 minutes and 45 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
import_api_app/resources/JobReport.py
View file @
46d6376b
...
@@ -60,13 +60,13 @@ class JobReport(Resource):
...
@@ -60,13 +60,13 @@ class JobReport(Resource):
try
:
# read job-reporting messages from kafka
try
:
# read job-reporting messages from kafka
topic_partition
=
TopicPartition
(
topic
=
topic_name
,
partition
=
0
)
topic_partition
=
TopicPartition
(
topic
=
topic_name
,
partition
=
0
)
job
M
essages
=
consumer
.
poll
(
1000
,
1000
)
job
_m
essages
=
consumer
.
poll
(
1000
,
1000
)
processed
=
succeeded
=
0
processed
=
succeeded
=
0
if
job
M
essages
:
if
job
_m
essages
:
for
jobMessage
in
job
M
essages
[
topic_partition
]:
for
jobMessage
in
job
_m
essages
[
topic_partition
]:
msg
V
alue
=
jobMessage
.
value
msg
_v
alue
=
jobMessage
.
value
if
msg
V
alue
[
'status'
]
==
'FAILURE'
:
if
msg
_v
alue
[
'status'
]
==
'FAILURE'
:
report
=
report
+
msg
V
alue
[
'id'
]
+
": "
+
msg
V
alue
[
'message'
]
+
"
\n
"
report
=
report
+
msg
_v
alue
[
'id'
]
+
": "
+
msg
_v
alue
[
'message'
]
+
"
\n
"
else
:
else
:
succeeded
=
succeeded
+
1
succeeded
=
succeeded
+
1
processed
=
processed
+
1
processed
=
processed
+
1
...
...
Write
Preview
Supports
Markdown
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