Prioritise processing the latest revisions for branches
Reserve some capacity to process revisions which are the tip of a branch. This should reduce the time between new revisions appearing, and then being processed.
This commit is contained in:
parent
6904547bf2
commit
413ef9ea6e
2 changed files with 36 additions and 12 deletions
|
|
@ -129,12 +129,17 @@
|
|||
#f)
|
||||
((jobs ...)
|
||||
(for-each
|
||||
(lambda (job-args)
|
||||
(let ((current-processes
|
||||
(hash-count (const #t) processes)))
|
||||
(when (< current-processes
|
||||
max-processes)
|
||||
(fork-and-process-job job-args))))
|
||||
(match-lambda
|
||||
((job-id priority?)
|
||||
(let ((current-processes
|
||||
(hash-count (const #t) processes)))
|
||||
(when (< current-processes
|
||||
(if priority?
|
||||
;; For priority jobs, burst up to twice the number
|
||||
;; of max processes
|
||||
(* 2 max-processes)
|
||||
max-processes))
|
||||
(fork-and-process-job (list job-id))))))
|
||||
jobs)))
|
||||
(unless (eq? 0 (sleep 15))
|
||||
(exit 0))))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue