Skip to content

Commit c8d20ae

Browse files
client: fix bug: no work fetch if reset project with max_concurrent
There was (perhaps unnecessary) logic for finding the max # of instances of a given resource that job of a given project could use. It did this by looking at the project's app versions. But if there are no app versions this gave zero. Fix: if no app versions, use one.
1 parent 34364ba commit c8d20ae

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

client/work_fetch.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ void RSC_PROJECT_WORK_FETCH::rr_init(PROJECT *p) {
7474
last_mc_limit_reltime = 0;
7575
if (p->app_configs.project_has_mc) {
7676
// compute x = max usage over this resource over P's app versions
77-
double x = 0;
77+
double x = 1; // in case there are no app versions
7878
for (APP_VERSION* avp: gstate.app_versions) {
7979
if (avp->project != p) continue;
8080
if (rsc_type && (avp->resource_usage.rsc_type == rsc_type)) {

0 commit comments

Comments
 (0)