Skip to content

Commit

Permalink
move constant to env ELASTICSEARCH_POST_INDEX_DELAY
Browse files Browse the repository at this point in the history
  • Loading branch information
aaxelb committed Dec 5, 2024
1 parent f770082 commit 0880650
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions project/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ def split(string, delim):
'TIMEOUT': int(os.environ.get('ELASTICSEARCH_TIMEOUT', '45')),
'CHUNK_SIZE': int(os.environ.get('ELASTICSEARCH_CHUNK_SIZE', 2000)),
'MAX_RETRIES': int(os.environ.get('ELASTICSEARCH_MAX_RETRIES', 7)),
'POST_INDEX_DELAY': int(os.environ.get('ELASTICSEARCH_POST_INDEX_DELAY', 3)),
}
ELASTICSEARCH5_URL = (
os.environ.get('ELASTICSEARCH5_URL')
Expand Down
2 changes: 1 addition & 1 deletion share/search/index_strategy/trovesearch_denorm.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def after_chunk(self, messages_chunk: messages.MessagesChunk, indexnames: Iterab
'card_pks': messages_chunk.target_ids_chunk,
'timestamp': messages_chunk.timestamp,
},
countdown=3, # TODO: config?
countdown=settings.ELASTICSEARCH['POST_INDEX_DELAY'],
)

# abstract method from Elastic8IndexStrategy
Expand Down

0 comments on commit 0880650

Please sign in to comment.