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

Release Database Cleanup Optimization #118

Merged
merged 3 commits into from
Jan 3, 2024
Merged

Release Database Cleanup Optimization #118

merged 3 commits into from
Jan 3, 2024

Conversation

dhakalaashish
Copy link
Contributor

No description provided.

dhakalaashish and others added 3 commits January 2, 2024 22:39
Max Duration Increased: Cron job duration extended from 60 to 300 seconds.
Time Check for Batch Deletion: Implemented time management in deleteGeoEventsBatch to avoid exceeding 4.5 minutes.
Optimized Data Fetching: Replaced include with select in Prisma queries to retrieve only necessary IDs, improving memory and time efficiency.
Efficient Site Alert Counting: Updated method for counting site alerts and notifications.
Narrowed Transaction Scope: Limited transaction scope to only critical delete and update operations.
Asynchronous Email Sending: Continued non-blocking email sending without await.
Enhanced Logging: Added detailed logging for each deletion operation.
Improved Error Handling: Wrapped main function in try-catch for better exception management.
Parallel Execution: Used Promise.all for concurrent execution of key functions.
Type Assertions in TypeScript: Applied type assertions for results from Promise.all.
…e-cleanup-optimization

Feature/database cleanup optimization
Copy link

vercel bot commented Jan 3, 2024

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

Name Status Preview Updated (UTC)
fire-alert ❌ Failed (Inspect) Jan 3, 2024 8:55am

@sagararyal sagararyal merged commit d83b6e9 into main Jan 3, 2024
2 of 4 checks passed
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