fc-queue-runner: plumb worker_count into fair-share scheduling

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I1f7f295bd7c2cbf46b64b22a3417ccc06a6a6964
This commit is contained in:
raf 2026-02-16 23:53:59 +03:00
commit 3716a34972
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
3 changed files with 232 additions and 22 deletions

View file

@ -29,7 +29,8 @@ pub async fn run(
}
loop {
match repo::builds::list_pending(&pool, 10).await {
let wc = worker_pool.worker_count() as i32;
match repo::builds::list_pending(&pool, 10, wc).await {
Ok(builds) => {
if !builds.is_empty() {
tracing::info!("Found {} pending builds", builds.len());