Skip to content
Snippets Groups Projects
Commit 00cbcfbe authored by Sébastien DA ROCHA's avatar Sébastien DA ROCHA
Browse files

Merge branch 'sdarocha-master-patch-75691' into 'master'

Add error logs when indexing to ingest

See merge request !20
parents 3a535bc4 a51d29e4
No related branches found
No related tags found
3 merge requests!24fix #12830,!22Report master to develop,!20Add error logs when indexing to ingest
Pipeline #21933 passed
...@@ -159,6 +159,14 @@ def index_docs(channel, method, properties, body): ...@@ -159,6 +159,14 @@ def index_docs(channel, method, properties, body):
channel.basic_nack(delivery_tag = method.delivery_tag, requeue=1) channel.basic_nack(delivery_tag = method.delivery_tag, requeue=1)
#print("") #print("")
#logging.error(json.dumps(rep, indent=4)) #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.') raise Exception('Failed to push documents to Elasticsearch.')
return return
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment