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

has_pending_actions_due() performance improvements #1036

Open
kkmuffme opened this issue Feb 24, 2024 · 2 comments
Open

has_pending_actions_due() performance improvements #1036

kkmuffme opened this issue Feb 24, 2024 · 2 comments
Labels
good first issue The issue is a good candidate for the first community contribution/for a newcomer to the team. priority: normal The issue/PR is normal priority—not many people are affected or there’s a workaround, etc. type: enhancement The issue is a request for an enhancement.

Comments

@kkmuffme
Copy link

has_pending_actions_due() should

  1. pass 'claimed' as true to the query to avoid triggering runners when there are no unclaimed tasks
  2. pass 'per_page' with value 1 since it's sufficient to get 1 result (instead of the default 5)
  3. pass 'orderby' with value 'none' to avoid unnecessary overhead of sorting the actions table
  4. pass 2nd parameter 'count' as that's faster than SELECT and sufficient for this use case
@coreymckrill coreymckrill added the type: enhancement The issue is a request for an enhancement. label Feb 28, 2024
@barryhughes
Copy link
Member

Sounds good!

Once we're ready to pick this up, let's just verify this is the correct way round:

pass 'claimed' as true to the query to avoid triggering runners when there are no unclaimed tasks

@barryhughes
Copy link
Member

...We'd be receptive to a PR should you (or anyone) wish to submit one for this. Otherwise, we'll try and get to it in due course.

@lsinger lsinger added priority: normal The issue/PR is normal priority—not many people are affected or there’s a workaround, etc. good first issue The issue is a good candidate for the first community contribution/for a newcomer to the team. labels Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue The issue is a good candidate for the first community contribution/for a newcomer to the team. priority: normal The issue/PR is normal priority—not many people are affected or there’s a workaround, etc. type: enhancement The issue is a request for an enhancement.
Projects
None yet
Development

No branches or pull requests

4 participants