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

Implement job priority #19

Open
raffis opened this issue Feb 20, 2019 · 0 comments
Open

Implement job priority #19

raffis opened this issue Feb 20, 2019 · 0 comments
Labels

Comments

@raffis
Copy link
Contributor

raffis commented Feb 20, 2019

  • Add new option TaskScheduler\Scheduler::OPTION_PRIORITY integer

Job with a higher priority should be processed before jobs with a lower (or 0).
Sorting by prio may be a problem since we can not sort a tailable cursor nor a changestream.
One possibility is to listen for new jobs and after processing a job do get first ordered by priority. If this results in 0 jobs start a tailable cursor (or this may be changestream in v4).

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

No branches or pull requests

1 participant