client: on initial RPC to a project, don't request work if 0 resource share

This commit is contained in:
David Anderson 2015-09-08 21:56:11 -07:00
parent 2f2f5a0c43
commit c9c3e9e4d9
1 changed files with 8 additions and 5 deletions

View File

@ -910,7 +910,9 @@ void WORK_FETCH::handle_reply(
// since we don't have good runtime estimates yet // since we don't have good runtime estimates yet
// //
void WORK_FETCH::set_initial_work_request(PROJECT* p) { void WORK_FETCH::set_initial_work_request(PROJECT* p) {
clear_request();
for (int i=0; i<coprocs.n_rsc; i++) { for (int i=0; i<coprocs.n_rsc; i++) {
if (p->resource_share > 0) {
rsc_work_fetch[i].req_secs = 1; rsc_work_fetch[i].req_secs = 1;
if (i) { if (i) {
RSC_WORK_FETCH& rwf = rsc_work_fetch[i]; RSC_WORK_FETCH& rwf = rsc_work_fetch[i];
@ -918,6 +920,7 @@ void WORK_FETCH::set_initial_work_request(PROJECT* p) {
rsc_work_fetch[i].req_secs = 0; rsc_work_fetch[i].req_secs = 0;
} }
} }
}
rsc_work_fetch[i].busy_time_estimator.reset(); rsc_work_fetch[i].busy_time_estimator.reset();
} }
} }