mirror of
https://github.com/project-zot/zot.git
synced 2026-06-15 20:07:55 +08:00
8215766720
Generators are now ordered by rank in the priority queue. The rank computation formula is: - 100/(1+generated_task_count) for high priority tasks - 10/(1+generated_task_count) for medium priority tasks - 1/(1+generated_task_count) for low priority tasks Note the ranks are used when comparing generators both with the same priority and with different priority. So now we are: - giving an opportunity to all generators with the same priority to take turns generating tasks - giving roughly 1 low priority and 10 medium priority tasks the opportunity to run for every 100 high priority tasks running. After a generator generates a task, the generators are reordered in the priority queue based on rank. Signed-off-by: Andrei Aaron <aaaron@luxoft.com>