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

perf: use last_scheduled_task_id for dueSchedules query #2383

Merged
merged 1 commit into from
Jun 20, 2024

Conversation

TBonnin
Copy link
Collaborator

@TBonnin TBonnin commented Jun 20, 2024

scanning tasks table to determine if a schedule has a running task or had a recently run task doesn't scale
we are now using the last_scheduled_task_id column in schedules to avoid heavy subqueries

Checklist before requesting a review (skip if just adding/editing APIs & templates)

  • I added tests, otherwise the reason is:
  • I added observability, otherwise the reason is:
  • I added analytics, otherwise the reason is:

);
});
})
.debug(true)
Copy link
Member

Choose a reason for hiding this comment

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

guessing this debug is temporary?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

no i forgot to remove it

Copy link
Member

@khaliqgant khaliqgant left a comment

Choose a reason for hiding this comment

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

Non blocking question

@TBonnin TBonnin force-pushed the tbonnin/due-schedule-query-v2 branch from 17faf40 to d87d5f7 Compare June 20, 2024 18:29
scanning tasks table to determine if a schedule has a running task or
had a recently run task doesn't scale
we are now using the last_scheduled_task_id column in schedules to avoid
heavy subqueries
@TBonnin TBonnin force-pushed the tbonnin/due-schedule-query-v2 branch from d87d5f7 to 9c2d89c Compare June 20, 2024 18:58
@TBonnin TBonnin merged commit 93ff562 into master Jun 20, 2024
20 checks passed
@TBonnin TBonnin deleted the tbonnin/due-schedule-query-v2 branch June 20, 2024 19:36
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