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
web-et-numerique
web-et-numerique-internet
data.grandlyon.com
web-portal
components
indexers
metadata-and-data
Commits
a51d29e4
Commit
a51d29e4
authored
Mar 01, 2022
by
Sébastien DA ROCHA
Browse files
Add error logs when indexing to ingest
parent
3a535bc4
Pipeline
#21930
passed with stage
in 26 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
workers/doc_indexer.py
View file @
a51d29e4
...
...
@@ -159,6 +159,14 @@ def index_docs(channel, method, properties, body):
channel
.
basic_nack
(
delivery_tag
=
method
.
delivery_tag
,
requeue
=
1
)
#print("")
#logging.error(json.dumps(rep, indent=4))
try
:
logging
.
error
(
json
.
dumps
([
item
.
get
(
"error"
,
{}).
get
(
"reason"
)
for
item
in
rep
.
get
(
"items"
,
[])
],
indent
=
4
))
except
:
pass
raise
Exception
(
'Failed to push documents to Elasticsearch.'
)
return
...
...
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