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

[GEN-2074]: Implement polling mechanism for refetching data in useSourceCRUD #2034

Merged
merged 12 commits into from
Dec 19, 2024

Conversation

BenElferink
Copy link
Contributor

This pull request introduces changes to the frontend/webapp/hooks/sources/useSourceCRUD.ts file to improve the polling mechanism and notification handling. The most important changes include adding a new startPolling function and modifying the handleComplete function to use this new polling mechanism.

Polling mechanism improvements:

  • Added a startPolling function using useCallback to handle retry logic for polling with a maximum of 5 retries and a 1-second interval between retries.
  • Modified the handleComplete function to call startPolling instead of directly calling refetch.

Import statement update:

  • Added useCallback import from react to support the new startPolling function.

Copy link

@BenElferink BenElferink enabled auto-merge (squash) December 19, 2024 16:20
@BenElferink BenElferink merged commit b5795e7 into odigos-io:main Dec 19, 2024
30 of 31 checks passed
@BenElferink BenElferink deleted the gen-2074 branch January 6, 2025 12:34
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