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

Add priority queue support #38

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add priority queue support #38

wants to merge 1 commit into from

Conversation

hylje
Copy link

@hylje hylje commented Jan 23, 2025

Use the power of Redis Lua scripting to implement priority queueing by sorting the queue list for each job priority.

While this approach has its limits if the queue is very long, as each insert iterates the entire queue at most twice, it is fully compatible with existing queue consumers who don't need to know about job priorities.

@codecov-commenter
Copy link

codecov-commenter commented Jan 23, 2025

Codecov Report

Attention: Patch coverage is 95.32164% with 8 lines in your changes missing coverage. Please review.

Project coverage is 91.79%. Comparing base (e4443b3) to head (3600318).

Files with missing lines Patch % Lines
minique/models/job.py 76.66% 6 Missing and 1 partial ⚠️
minique_tests/test_priority.py 98.79% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #38      +/-   ##
==========================================
+ Coverage   91.11%   91.79%   +0.68%     
==========================================
  Files          25       27       +2     
  Lines         855     1012     +157     
  Branches      115       93      -22     
==========================================
+ Hits          779      929     +150     
- Misses         45       51       +6     
- Partials       31       32       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@hylje hylje force-pushed the priority-queue branch 2 times, most recently from a172a97 to 6b5e448 Compare January 23, 2025 10:18
@hylje hylje requested review from akx and ruksi and removed request for akx January 23, 2025 10:21
@hylje hylje added the orchestration 🎻 Orchestration team tasks label Jan 27, 2025
@hylje hylje force-pushed the priority-queue branch 3 times, most recently from 2f9a17f to 54e7990 Compare January 28, 2025 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
orchestration 🎻 Orchestration team tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants