diff options
Diffstat (limited to 'src/solver_sjf.c')
-rw-r--r-- | src/solver_sjf.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/solver_sjf.c b/src/solver_sjf.c index c81f718..4cbdbc1 100644 --- a/src/solver_sjf.c +++ b/src/solver_sjf.c @@ -18,11 +18,14 @@ int solver_sjf(struct job **job, struct job_clist *q, int32_t resources) continue; cost_cur = job_cost_recursive(j); + if (cost_cur < 0) + return cost_cur; + if (cost_cur > resources) { job_stale_set(j); if (evanix_opts.solver_report) { printf("❌ refusing to build %s, cost: %d\n", - j->drv_path, job_cost_recursive(j)); + j->drv_path, cost_cur); } } |