Skip to content

Commit

Permalink
improved timeouts + worker configs
Browse files Browse the repository at this point in the history
  • Loading branch information
pablonyx committed Nov 3, 2024
1 parent 9bc478f commit 10ab084
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 14 deletions.
3 changes: 1 addition & 2 deletions backend/danswer/background/celery/apps/beat.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class DynamicTenantScheduler(PersistentScheduler):
def __init__(self, *args: Any, **kwargs: Any) -> None:
logger.info("Initializing DynamicTenantScheduler")
super().__init__(*args, **kwargs)
self._reload_interval = timedelta(minutes=0.1)
self._reload_interval = timedelta(minutes=2)
self._last_reload = self.app.now() - self._reload_interval
# Let the parent class handle store initialization
self.setup_schedule()
Expand All @@ -36,7 +36,6 @@ def setup_schedule(self) -> None:
logger.info("Initial schedule setup complete")

def tick(self) -> float:
logger.info("Tick started")
retval = super().tick()
now = self.app.now()
if (
Expand Down
1 change: 1 addition & 0 deletions backend/danswer/background/celery/apps/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,6 @@ def on_setup_logging(
[
"danswer.background.celery.tasks.shared",
"danswer.background.celery.tasks.vespa",
"danswer.background.celery.tasks.connector_deletion",
]
)
2 changes: 1 addition & 1 deletion backend/danswer/background/celery/tasks/beat_schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
{
"name": "check-for-connector-deletion",
"task": "check_for_connector_deletion_task",
"schedule": timedelta(seconds=60),
"schedule": timedelta(seconds=20),
"options": {"priority": DanswerCeleryPriority.HIGH},
},
{
Expand Down
4 changes: 2 additions & 2 deletions deployment/cloud_kubernetes/workers/beat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
spec:
containers:
- name: celery-beat
image: danswer/danswer-backend:v0.11.0-cloud.beta.2
image: danswer/danswer-backend:v0.11.0-cloud.beta.3
imagePullPolicy: Always
command:
[
Expand All @@ -31,7 +31,7 @@ spec:
name: danswer-secrets
key: redis_password
- name: DANSWER_VERSION
value: "v0.11.0-cloud.beta.1"
value: "v0.11.0-cloud.beta.3"
envFrom:
- configMapRef:
name: env-configmap
Expand Down
4 changes: 2 additions & 2 deletions deployment/cloud_kubernetes/workers/heavy_worker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
spec:
containers:
- name: celery-worker-heavy
image: danswer/danswer-backend:v0.11.0-cloud.beta.2
image: danswer/danswer-backend:v0.11.0-cloud.beta.3
imagePullPolicy: Always
command:
[
Expand All @@ -34,7 +34,7 @@ spec:
name: danswer-secrets
key: redis_password
- name: DANSWER_VERSION
value: "v0.11.0-cloud.beta.1"
value: "v0.11.0-cloud.beta.3"
envFrom:
- configMapRef:
name: env-configmap
Expand Down
4 changes: 2 additions & 2 deletions deployment/cloud_kubernetes/workers/indexing_worker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
spec:
containers:
- name: celery-worker-indexing
image: danswer/danswer-backend:v0.11.0-cloud.beta.2
image: danswer/danswer-backend:v0.11.0-cloud.beta.3
imagePullPolicy: Always
command:
[
Expand All @@ -34,7 +34,7 @@ spec:
name: danswer-secrets
key: redis_password
- name: DANSWER_VERSION
value: "v0.11.0-cloud.beta.1"
value: "v0.11.0-cloud.beta.3"
envFrom:
- configMapRef:
name: env-configmap
Expand Down
4 changes: 2 additions & 2 deletions deployment/cloud_kubernetes/workers/light_worker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
spec:
containers:
- name: celery-worker-light
image: danswer/danswer-backend:v0.11.0-cloud.beta.2
image: danswer/danswer-backend:v0.11.0-cloud.beta.3
imagePullPolicy: Always
command:
[
Expand All @@ -34,7 +34,7 @@ spec:
name: danswer-secrets
key: redis_password
- name: DANSWER_VERSION
value: "v0.11.0-cloud.beta.1"
value: "v0.11.0-cloud.beta.3"
envFrom:
- configMapRef:
name: env-configmap
Expand Down
6 changes: 3 additions & 3 deletions deployment/cloud_kubernetes/workers/primary.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
spec:
containers:
- name: celery-worker-primary
image: danswer/danswer-backend:v0.11.0-cloud.beta.2
image: danswer/danswer-backend:v0.11.0-cloud.beta.3
imagePullPolicy: Always
command:
[
Expand All @@ -25,7 +25,7 @@ spec:
"--loglevel=INFO",
"--hostname=primary@%n",
"-Q",
"celery",
"celery,periodic_tasks,vespa_metadata_sync",
]
env:
- name: REDIS_PASSWORD
Expand All @@ -34,7 +34,7 @@ spec:
name: danswer-secrets
key: redis_password
- name: DANSWER_VERSION
value: "v0.11.0-cloud.beta.1"
value: "v0.11.0-cloud.beta.3"
envFrom:
- configMapRef:
name: env-configmap
Expand Down

0 comments on commit 10ab084

Please sign in to comment.