Skip to content

Commit

Permalink
move conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
rkuo-danswer committed Oct 30, 2024
1 parent 10df616 commit 7db337c
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions backend/danswer/background/celery/tasks/indexing/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,13 @@ def check_for_indexing(self: Task, *, tenant_id: str | None) -> int | None:
# So that the first time users aren't surprised by really slow speed of first
# batch of documents indexed
if current_search_settings.provider_type is None and not MULTI_TENANT:
embedding_model = EmbeddingModel.from_db_model(
search_settings=current_search_settings,
server_host=INDEXING_MODEL_SERVER_HOST,
server_port=INDEXING_MODEL_SERVER_PORT,
)
if old_search_settings:
embedding_model = EmbeddingModel.from_db_model(
search_settings=current_search_settings,
server_host=INDEXING_MODEL_SERVER_HOST,
server_port=INDEXING_MODEL_SERVER_PORT,
)

# only warm up if search settings were changed
warm_up_bi_encoder(
embedding_model=embedding_model,
Expand Down

0 comments on commit 7db337c

Please sign in to comment.