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

fix(delayed): avoid using jobId in order to schedule delayed jobs #2587

Merged
merged 14 commits into from
Jul 11, 2024

Conversation

roggervalf
Copy link
Collaborator

Copy link
Contributor

@manast manast left a comment

Choose a reason for hiding this comment

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

I propose a different way to calculate the score for the delayed job in the ZSET by using ZCOUNT https://redis.io/docs/latest/commands/zcount/ using as range all the possible values that a delayed job could get within a timestamp, that is:
[timestamp * 4096, (timestamp + 1) * 4096]. The count + 1 would then be used as the jobCounter is used today.

@roggervalf roggervalf changed the title fix(delayed): use jobCounter in order to schedule delayed jobs fix(delayed): avoid using jobId in order to schedule delayed jobs Jun 1, 2024
Copy link
Contributor

@manast manast left a comment

Choose a reason for hiding this comment

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

This looks good to me. Lets give it a bit more thought before merging just to make sure it really works well.

@roggervalf roggervalf force-pushed the fix-move-to-delayed-job-counter branch from 229d5fc to 84a1e89 Compare June 22, 2024 14:28
@roggervalf roggervalf force-pushed the fix-move-to-delayed-job-counter branch from 84a1e89 to 5401174 Compare June 29, 2024 01:45
Copy link
Contributor

@manast manast left a comment

Choose a reason for hiding this comment

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

I think this is a great PR, for me everything looks correct.

@roggervalf roggervalf merged commit 228db2c into master Jul 11, 2024
11 checks passed
@roggervalf roggervalf deleted the fix-move-to-delayed-job-counter branch July 11, 2024 00:20
github-actions bot pushed a commit that referenced this pull request Jul 11, 2024
## [5.8.6](v5.8.5...v5.8.6) (2024-07-11)

### Bug Fixes

* **delayed:** avoid using jobId in order to schedule delayed jobs ([#2587](#2587)) (python) ([228db2c](228db2c))
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