-
Notifications
You must be signed in to change notification settings - Fork 429
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
refactor(db-scheduler): optimize all_as_schedule query #835
base: main
Are you sure you want to change the base?
Conversation
…rying the database
…refactor all_as_schedule test
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #835 +/- ##
==========================================
+ Coverage 87.20% 87.40% +0.20%
==========================================
Files 32 32
Lines 938 953 +15
Branches 76 76
==========================================
+ Hits 818 833 +15
Misses 102 102
Partials 18 18 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes look good from the first review. I will thoroughly Review it again in a couple of days before merging
I have also encountered performance issues when there are a large number of scheduled tasks. I addressed this in a straightforward manner by adding a However, it is evident that alirafiei75's solution is more ingenious. It not only addresses the performance issues but also effectively reduces the pressure on database queries. |
Summary
This PR optimizes the
all_as_schedule
function to improve performance by filtering unnecessary tasks from the database query.Changes
fixes #675
fixes #786