fc-common: implement deficit-based fair-share scheduling in list_pending

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ic1345cfdf712aa6ee6f0eeae45b3e62b6a6a6964
This commit is contained in:
raf 2026-02-16 23:41:55 +03:00
commit 4100ac54c2
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
2 changed files with 21 additions and 5 deletions

View file

@ -293,7 +293,7 @@ async fn test_evaluation_and_build_lifecycle() {
assert_eq!(build.system.as_deref(), Some("x86_64-linux"));
// List pending
let pending = repo::builds::list_pending(&pool, 10)
let pending = repo::builds::list_pending(&pool, 10, 4)
.await
.expect("list pending");
assert!(pending.iter().any(|b| b.id == build.id));