refactor: added batch commits and Increased task time limits in celery_app.py #464
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Screenshots
API Changes
Change Type
Testing Performed
Checklist
High-level PR Summary
This PR implements performance optimizations across the backend indexing system by introducing batch commits every 10 documents for all connector indexers (Airtable, ClickUp, Confluence, Discord, GitHub, Google Calendar, Gmail, JIRA, Linear, Luma, Notion, Slack) to reduce database load. It also increases Celery task time limits from 1 hour to 8 hours to accommodate longer-running indexing operations, and enhances the Notion connector's pagination logic to properly handle large result sets. Additionally, the frontend receives updates to the chat connector selector UI to support both indexed document types and live search connectors.
⏱️ Estimated Review Time: 30-90 minutes
💡 Review Order Suggestion
surfsense_backend/app/celery_app.pysurfsense_backend/app/connectors/notion_history.pysurfsense_backend/app/tasks/connector_indexers/airtable_indexer.pysurfsense_backend/app/tasks/connector_indexers/clickup_indexer.pysurfsense_backend/app/tasks/connector_indexers/confluence_indexer.pysurfsense_backend/app/tasks/connector_indexers/discord_indexer.pysurfsense_backend/app/tasks/connector_indexers/github_indexer.pysurfsense_backend/app/tasks/connector_indexers/google_calendar_indexer.pysurfsense_backend/app/tasks/connector_indexers/google_gmail_indexer.pysurfsense_backend/app/tasks/connector_indexers/jira_indexer.pysurfsense_backend/app/tasks/connector_indexers/linear_indexer.pysurfsense_backend/app/tasks/connector_indexers/luma_indexer.pysurfsense_backend/app/tasks/connector_indexers/notion_indexer.pysurfsense_backend/app/tasks/connector_indexers/slack_indexer.pysurfsense_web/components/chat/ChatInputGroup.tsxsurfsense_web/app/dashboard/page.tsxsurfsense_web/app/(home)/login/GoogleLoginButton.tsxsurfsense_web/components/sidebar/app-sidebar.tsxsurfsense_web/app/(home)/login/GoogleLoginButton.tsxsurfsense_web/app/dashboard/page.tsxsurfsense_web/components/sidebar/app-sidebar.tsxsurfsense_web/components/chat/ChatInputGroup.tsx