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

Job Reservers #18

Open
danhunsaker opened this issue Jan 6, 2019 · 0 comments
Open

Job Reservers #18

danhunsaker opened this issue Jan 6, 2019 · 0 comments

Comments

@danhunsaker
Copy link
Member

Expected Behavior

Refactor the current job reservation logic to call out to one of several, separate job reserver classes, and implement an additional one for selecting between configured queues at random.

Current Behavior

At the moment, only two reservation options exist - queue list iteration, or blocking pop. In the first, the worker scans each queue in order, and the first one it finds a job in is the one it pulls work from; it then restarts at the top of the list. In the second, the worker waits for any queue to have a job, but will still execute jobs in highest priority queues exclusively, until said queues are empty, before moving on to lower-priority queues. This isn't effective for all users, so an additional mechanism has been proposed, which checks queues in a random order, rather than in the configured "priority" order. To implement this effectively, it's helpful to pull the job reservation logic out into separate classes entirely, making the process of adding others considerably simpler in the future.

Possible Solution

The original attempt at this, by @rayward, was in chrisboulton/php-resque#338

Context

This feature was originally suggested and Pull Requested under the old home for this project. This issue is intended to pull this functionality over to the current repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

1 participant