Build Priority

Issue #7 new
Doug Freed created an issue

Assign priorities to build jobs, and allow the user to adjust them up or down as they see fit. I'll probably use 0-40, with presets every 5. 20 is normal, and lower number means higher priority. Some rules will be applied:

  • Build jobs with 5 or more tasks will be assigned 20 + $numTasks priority.
  • Build jobs with any number of custom tasks will get 20 + 5 * $numCustomTasks priority.
  • Build jobs with a tinderbox task will get absolute lowest priority (40).
  • Whichever rule results in the highest number wins

Requesting a higher priority than the default will require explanation and manual approval. The job will be inserted at the default priority, and if it still hasn't completed by the time the approval is processed, it'll get its priority bumped up, hopefully completing sooner than it would have otherwise.

While priority is per job, scheduling will be per task. So if a low priority job with 2 tasks is running its first task, and another job is inserted with normal priority, that normal priority job's tasks will run after the low priority job's first task finishes, and before the low priority job's second task. There'll likely be more parallelization than this, but this is the general idea. If there are a large number of long-running low priority tasks, I may look into allowing higher priority tasks to preempt lower priority ones.

Comments (0)

  1. Log in to comment