Skip to content

Commit

Permalink
Initial commit using ElasticSearch's retry_on_conflict feature on _up…
Browse files Browse the repository at this point in the history
…date operations.
  • Loading branch information
kburke committed Jul 18, 2024
1 parent 1bc7507 commit 5dc106f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -1384,9 +1384,13 @@ def create_request_headers_for_auth(self, token):
return headers_dict

def init_translator(self, token):
if self.ubkg_instance is None:
return self.translator_module.Translator(self.INDICES, self.APP_CLIENT_ID, self.APP_CLIENT_SECRET, token, self.ONTOLOGY_API_BASE_URL)
return self.translator_module.Translator(self.INDICES, self.APP_CLIENT_ID, self.APP_CLIENT_SECRET, token, self.ubkg_instance)
ont_api_base_url = self.ONTOLOGY_API_BASE_URL if self.ubkg_instance is None else self.ubkg_instance
return self.translator_module.Translator( indices=self.INDICES
, app_client_id=self.APP_CLIENT_ID
, app_client_secret=self.APP_CLIENT_SECRET
, token=token
, ontology_api_base_url=ont_api_base_url
, es_retry_on_conflict_freq=self.ES_RETRY_ON_CONFLICT_FREQ)

# Get a list of filtered Elasticsearch indices to expose to end users without the prefix
def get_filtered_indices(self):
Expand Down

0 comments on commit 5dc106f

Please sign in to comment.