mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-19 05:52:20 +00:00
Added error handling (#4252)
This commit is contained in:
parent
a3629dbea1
commit
90c1f620b8
@ -50,15 +50,21 @@ class ESMixin(Generic[T]):
|
|||||||
if value is not None
|
if value is not None
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
resp_es = self.client.get(
|
|
||||||
self.es_url.format(
|
|
||||||
service_name, generate_es_string, from_count, size, search_index
|
|
||||||
)
|
|
||||||
)
|
|
||||||
multiple_entities = []
|
multiple_entities = []
|
||||||
if resp_es:
|
try:
|
||||||
for table_hit in resp_es["hits"]["hits"]:
|
resp_es = self.client.get(
|
||||||
multiple_entities.append(
|
self.es_url.format(
|
||||||
self.get_by_name(entity=Table, fqdn=table_hit["_source"]["fqdn"])
|
service_name, generate_es_string, from_count, size, search_index
|
||||||
)
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
if resp_es:
|
||||||
|
for table_hit in resp_es["hits"]["hits"]:
|
||||||
|
multiple_entities.append(
|
||||||
|
self.get_by_name(
|
||||||
|
entity=Table, fqdn=table_hit["_source"]["fqdn"]
|
||||||
|
)
|
||||||
|
)
|
||||||
|
except Exception as err:
|
||||||
|
logger.error(f"Elasticsearch failed for query: {generate_es_string}")
|
||||||
return multiple_entities
|
return multiple_entities
|
||||||
|
@ -243,4 +243,5 @@ class OMetaLineageMixin(Generic[T]):
|
|||||||
)
|
)
|
||||||
return True
|
return True
|
||||||
except Exception as err:
|
except Exception as err:
|
||||||
logger.error(str(err))
|
logger.debug(str(err))
|
||||||
|
logger.error(f"Ingesting lineage failed")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user