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

Optimizing alert fetcher logic #176

Merged
merged 2 commits into from
May 7, 2024

Conversation

dhakalaashish
Copy link
Contributor

This PR introduces batch processing for the createSiteAlert SQL function, significantly enhancing performance and operational efficiency. By processing data in manageable increments, we reduce load and improve the system's responsiveness. This structured approach ensures smoother execution and better resource management during site alert generation.

Additionally, this PR incorporates a random selection mechanism for choosing among the oldest geo-event providers using the Fisher-Yates shuffle algorithm, ensuring an unbiased and uniformly random selection. This approach prevents the recurring selection of a single provider, which could potentially lead to infinite error loops. By randomly selecting from the oldest providers, we mitigate the risk of persistent failures affecting system stability.

Copy link

vercel bot commented May 6, 2024

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

Name Status Preview Updated (UTC)
fire-alert ✅ Ready (Inspect) Visit Preview May 7, 2024 8:57am

Copy link
Contributor

@shyambhongle shyambhongle left a comment

Choose a reason for hiding this comment

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

Good to be merge.

@dhakalaashish dhakalaashish merged commit e34b614 into develop May 7, 2024
3 of 5 checks passed
@dhakalaashish dhakalaashish deleted the feature/optimizing-alert-fetcher branch May 7, 2024 09:00
@dhakalaashish dhakalaashish mentioned this pull request May 7, 2024
dhakalaashish added a commit that referenced this pull request May 7, 2024
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