- client: in checking reasons for not requesting work,

look at backoff last.
    Otherwise the user can get a misleading message if they
    update a project that's backed off
This commit is contained in:
David Anderson 2012-11-01 11:29:05 -07:00 committed by Oliver Bock
parent 95621d4008
commit 5457b6b77f
2 changed files with 15 additions and 1 deletions

View File

@ -6570,3 +6570,14 @@ David 1 Nov 2012
mem_usage.cpp
sched/
sched_timezone.cpp
David 1 Nov 2012
- client: in checking reasons for not requesting work,
look at backoff last.
Otherwise the user can get a misleading message if they
update a project that's backed off
client/
work_fetch.cpp
client/
work_fetch.cpp

View File

@ -533,11 +533,14 @@ int PROJECT_WORK_FETCH::compute_cant_fetch_work_reason(PROJECT* p) {
if (p->non_cpu_intensive) return CANT_FETCH_WORK_NON_CPU_INTENSIVE;
if (p->suspended_via_gui) return CANT_FETCH_WORK_SUSPENDED_VIA_GUI;
if (p->master_url_fetch_pending) return CANT_FETCH_WORK_MASTER_URL_FETCH_PENDING;
if (p->min_rpc_time > gstate.now) return CANT_FETCH_WORK_MIN_RPC_TIME;
if (p->dont_request_more_work) return CANT_FETCH_WORK_DONT_REQUEST_MORE_WORK;
if (p->some_download_stalled()) return CANT_FETCH_WORK_DOWNLOAD_STALLED;
if (p->some_result_suspended()) return CANT_FETCH_WORK_RESULT_SUSPENDED;
if (p->too_many_uploading_results) return CANT_FETCH_WORK_TOO_MANY_UPLOADS;
// this goes last
//
if (p->min_rpc_time > gstate.now) return CANT_FETCH_WORK_MIN_RPC_TIME;
return 0;
}