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

fix index attempt refreshing automatically #2791

Merged
merged 1 commit into from
Oct 15, 2024
Merged

Conversation

rkuo-danswer
Copy link
Contributor

Description

Fixes DAN-811.

How Has This Been Tested?

[Describe the tests you ran to verify your changes]

Accepted Risk

[Any know risks or failure modes to point out to reviewers]

Related Issue(s)

[If applicable, link to the issue(s) this PR addresses]

Checklist:

  • All of the automated tests pass
  • All PR comments are addressed and marked resolved
  • If there are migrations, they have been rebased to latest main
  • If there are new dependencies, they are added to the requirements
  • If there are new environment variables, they are added to all of the deployment methods
  • If there are new APIs that don't require auth, they are added to PUBLIC_ENDPOINT_SPECS
  • Docker images build and basic functionalities work
  • Author has done a final read through of the PR right before merge

Copy link

vercel bot commented Oct 14, 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 14, 2024 8:50am

@rkuo-danswer rkuo-danswer marked this pull request as ready for review October 14, 2024 09:34
Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This pull request implements automatic refreshing of index attempts data in the connector management interface, enhancing real-time updates for users.

  • Added periodic data fetching every 5 seconds in web/src/app/admin/connector/[ccPairId]/IndexingAttemptsTable.tsx
  • Updated useEffect dependency array in web/src/app/admin/connector/[ccPairId]/page.tsx to include finishConnectorDeletion
  • Potential performance impact due to frequent API calls in IndexingAttemptsTable.tsx
  • Improved handling of connector deletion process in page.tsx

2 file(s) reviewed, 2 comment(s)
Edit PR Review Bot Settings | Greptile

@@ -145,7 +145,7 @@ export function IndexingAttemptsTable({ ccPair }: { ccPair: CCPairFullInfo }) {
if (!cachedBatches[0]) {
fetchBatchData(0);
}
}, [ccPair.id, page, cachedBatches, totalPages]);
}, [ccPair.id, page, cachedBatches, totalPages, fetchBatchData]);
Copy link

Choose a reason for hiding this comment

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

style: Adding fetchBatchData to the dependency array may cause unnecessary re-renders. Consider using useCallback for fetchBatchData

@pablonyx pablonyx added this pull request to the merge queue Oct 15, 2024
Merged via the queue into main with commit aa5be37 Oct 15, 2024
7 checks passed
@rkuo-danswer rkuo-danswer deleted the bugfix/connector_refresh branch October 23, 2024 05:47
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.

3 participants