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

pablonyx
Copy link
Contributor

@pablonyx pablonyx 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).

@pablonyx pablonyx force-pushed the tenant_provisioning_dataplane branch 2 times, most recently from 6a7250d to b579648 Compare October 6, 2024 03:52
@pablonyx pablonyx force-pushed the tenant_context_background branch from 2247ed3 to 8e92aed Compare October 6, 2024 05:12
@pablonyx pablonyx changed the base branch from tenant_provisioning_dataplane to main October 6, 2024 05:13
@pablonyx pablonyx enabled auto-merge October 6, 2024 21:56
@pablonyx pablonyx force-pushed the tenant_context_background branch from 0cbb679 to e3424e1 Compare October 8, 2024 03:03
@pablonyx pablonyx force-pushed the tenant_context_background branch from da194ae to 90331bd Compare October 8, 2024 18:11
@pablonyx pablonyx changed the title Add tenant context to background tasks Add tenant context Oct 8, 2024
@pablonyx pablonyx force-pushed the tenant_context_background branch from bc41ccd to e9043ef Compare October 9, 2024 23:56
@pablonyx pablonyx force-pushed the tenant_context_background branch from d52a499 to a4dad03 Compare October 10, 2024 16:16
@pablonyx pablonyx 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
@pablonyx pablonyx deleted the tenant_context_background branch October 17, 2024 23:14
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