mirror of https://github.com/BOINC/boinc.git
- client: don't do scheduler-requested RPCs if
- project is set to No New Work, and - project has no jobs on the client svn path=/trunk/boinc/; revision=24348
This commit is contained in:
parent
0e225d889d
commit
57c04979b3
|
@ -6935,3 +6935,13 @@ David 7 Oct 2011
|
||||||
|
|
||||||
client/
|
client/
|
||||||
app_start.cpp
|
app_start.cpp
|
||||||
|
|
||||||
|
David 7 Oct 2011
|
||||||
|
- client: don't do scheduler-requested RPCs if
|
||||||
|
- project is set to No New Work, and
|
||||||
|
- project has no jobs on the client
|
||||||
|
|
||||||
|
client/
|
||||||
|
client_types.h
|
||||||
|
work_fetch.cpp
|
||||||
|
cs_scheduler.cpp
|
||||||
|
|
|
@ -422,6 +422,7 @@ struct PROJECT : PROJ_AM {
|
||||||
// don't request work from a project if an upload started
|
// don't request work from a project if an upload started
|
||||||
// in last X minutes and is still active
|
// in last X minutes and is still active
|
||||||
bool uploading();
|
bool uploading();
|
||||||
|
bool has_results();
|
||||||
|
|
||||||
struct RESULT *next_runnable_result;
|
struct RESULT *next_runnable_result;
|
||||||
// the next result to run for this project
|
// the next result to run for this project
|
||||||
|
|
|
@ -1095,9 +1095,16 @@ PROJECT* CLIENT_STATE::next_project_sched_rpc_pending() {
|
||||||
bool honor_backoff = true;
|
bool honor_backoff = true;
|
||||||
bool honor_suspend = true;
|
bool honor_suspend = true;
|
||||||
|
|
||||||
|
// is a scheduler-requested RPC due?
|
||||||
|
//
|
||||||
if (!p->sched_rpc_pending && p->next_rpc_time && p->next_rpc_time<now) {
|
if (!p->sched_rpc_pending && p->next_rpc_time && p->next_rpc_time<now) {
|
||||||
|
// don't do it if project is set to no new work
|
||||||
|
// and has no jobs currently
|
||||||
|
//
|
||||||
|
if (!p->dont_request_more_work || p->has_results()) {
|
||||||
p->sched_rpc_pending = RPC_REASON_PROJECT_REQ;
|
p->sched_rpc_pending = RPC_REASON_PROJECT_REQ;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
switch (p->sched_rpc_pending) {
|
switch (p->sched_rpc_pending) {
|
||||||
case RPC_REASON_USER_REQ:
|
case RPC_REASON_USER_REQ:
|
||||||
|
|
|
@ -915,6 +915,14 @@ bool PROJECT::downloading() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool PROJECT::has_results() {
|
||||||
|
for (unsigned i=0; i<gstate.results.size(); i++) {
|
||||||
|
RESULT *rp = gstate.results[i];
|
||||||
|
if (rp->project == this) return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
bool PROJECT::some_result_suspended() {
|
bool PROJECT::some_result_suspended() {
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
for (i=0; i<gstate.results.size(); i++) {
|
for (i=0; i<gstate.results.size(); i++) {
|
||||||
|
|
Loading…
Reference in New Issue