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

Order by due_at #87

Merged
merged 2 commits into from
Sep 30, 2019
Merged

Order by due_at #87

merged 2 commits into from
Sep 30, 2019

Conversation

tpitale
Copy link
Collaborator

@tpitale tpitale commented Sep 23, 2019

Currently, a job enqueued first will run first regardless of the order of the due_at, which could, given enough work allow a single job to run multiple times (in the case of retries) before another job that was enqueued originally after, but due before the retried jobs.

This PR is complicated by the need to again change the locking index to retain performance levels on the job lock query. The DB upgrade is not required to function, but there may be performance degradation without it.

Resolves #86

Copy link
Owner

@samsondav samsondav left a comment

Choose a reason for hiding this comment

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

This seems fine to me.

@tpitale tpitale merged commit 9b4fb28 into samsondav:master Sep 30, 2019
@tpitale tpitale deleted the order-by-due-at branch September 30, 2019 23:34
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.

Should due_at be part of the order in the lock query?
2 participants