Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tenant context #2596

Merged
merged 23 commits into from
Oct 10, 2024
Merged

Add tenant context #2596

merged 23 commits into from
Oct 10, 2024

Conversation

pablodanswer
Copy link
Contributor

@pablodanswer pablodanswer commented Sep 29, 2024

Description

Initial addition of tenant context to background processing/tasks

  • Upcoming PR updates provisioning to ensure all tenants get background processing tasks

Copy link

vercel bot commented Sep 29, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
internal-search ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 10, 2024 4:19pm

"task": "check_for_vespa_sync_task",
"schedule": timedelta(seconds=5),
"options": {"priority": DanswerCeleryPriority.HIGH},
"args": (tenant_id,),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the upside/downside of doing this per tenant vs iterating over the tenants in the actual task?

@@ -392,13 +405,35 @@ def kickoff_indexing_jobs(
return existing_jobs_copy


def get_all_tenant_ids() -> list[str] | list[None]:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add some prefix for the tenants to double check they're danswer tenants? In case there is other stuff in the DB (which there probably shouldn't be it's better to be safe).

@pablodanswer pablodanswer force-pushed the tenant_provisioning_dataplane branch 2 times, most recently from 6a7250d to b579648 Compare October 6, 2024 03:52
@pablodanswer pablodanswer changed the base branch from tenant_provisioning_dataplane to main October 6, 2024 05:13
@pablodanswer pablodanswer changed the title Add tenant context to background tasks Add tenant context Oct 8, 2024
@pablodanswer pablodanswer added this pull request to the merge queue Oct 10, 2024
Merged via the queue into main with commit f40c5ca Oct 10, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants