Implement job priority
raffis opened this issue · 0 comments
raffis commented
- 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).