Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use sort_by{rand} instead of sort{rand} for randomization as sort{ran…
…d} is of consistent outcome. Thanks Alex Ostleitner.
- Loading branch information
9935082
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What’s the goal of randomizing the order here? It seems that on line 112, the code specifies a particular order (NextTaskOrder) which includes priority. Wouldn’t that order be lost by line 115?
9935082
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
luke, I came across the problem that having 3 jobs with a high priority and a dozen of lower prioritized jobs DJ decided to work off the less important jobs – simply because it grabbed 5 jobs, always ‘randomized’ them the same way, therefor always coming up with the same order, which unfortunately put the less important jobs first in the queue.
Oh, and the basic goal of picking the next job randomly out of the first 5 jobs has the goal to reduce the possibility of parallel workers attempting to work off the same job (locked) at the same time. In other words, DJ is currently optimized for 3-5 parallel workers, with the downside that if you only have one or two workers you might occasionally end up with low priority jobs being worked off first.
9935082
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any further thoughts on the sort_by ? Why do we need to sort the jobs ?
Sorting the jobs on the queue feels wrong.