Skip to content

Commit

Permalink
don't wait in multi tenant case
Browse files Browse the repository at this point in the history
  • Loading branch information
pablodanswer committed Nov 9, 2024
1 parent 0f605a8 commit 4ec1331
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion backend/danswer/background/celery/apps/app_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ def on_celeryd_init(sender: Any = None, conf: Any = None, **kwargs: Any) -> None
def wait_for_redis(sender: Any, **kwargs: Any) -> None:
"""Waits for redis to become ready subject to a hardcoded timeout.
Will raise WorkerShutdown to kill the celery worker if the timeout is reached."""
if MULTI_TENANT:
return

r = get_redis_client(tenant_id=None)

Expand Down Expand Up @@ -188,7 +190,8 @@ def wait_for_redis(sender: Any, **kwargs: Any) -> None:
def wait_for_db(sender: Any, **kwargs: Any) -> None:
"""Waits for the db to become ready subject to a hardcoded timeout.
Will raise WorkerShutdown to kill the celery worker if the timeout is reached."""

if MULTI_TENANT:
return
WAIT_INTERVAL = 5
WAIT_LIMIT = 60

Expand Down Expand Up @@ -230,6 +233,8 @@ def wait_for_db(sender: Any, **kwargs: Any) -> None:
def wait_for_vespa(sender: Any, **kwargs: Any) -> None:
"""Waits for Vespa to become ready subject to a hardcoded timeout.
Will raise WorkerShutdown to kill the celery worker if the timeout is reached."""
if MULTI_TENANT:
return

WAIT_INTERVAL = 5
WAIT_LIMIT = 60
Expand Down

0 comments on commit 4ec1331

Please sign in to comment.