mirror of https://github.com/BOINC/boinc.git
forgot a couple of files.
svn path=/trunk/boinc/; revision=625
This commit is contained in:
parent
ffc115afa2
commit
70f1ffeb22
|
@ -110,6 +110,8 @@ PROJECT* CLIENT_STATE::next_project(PROJECT* old) {
|
|||
pbest = 0;
|
||||
for (i=0; i<projects.size(); i++) {
|
||||
p = projects[i];
|
||||
if (p->master_url_fetch_pending)
|
||||
continue;
|
||||
if (p->min_rpc_time > now ) continue;
|
||||
if (old && p->debt_order <= old->debt_order) continue;
|
||||
if (p->debt_order < best) {
|
||||
|
|
|
@ -47,10 +47,17 @@ int SCHEDULER_OP::init_get_work() {
|
|||
if( (retval=init_op_project(ns)) ) {
|
||||
sprintf(err_msg, "init_get_work failed, error %d\n", retval);
|
||||
backoff(project, err_msg);
|
||||
|
||||
return retval;
|
||||
return retval;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
project = gstate.next_project_master_pending();
|
||||
if (project) {
|
||||
init_master_fetch(project);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -295,11 +302,13 @@ bool SCHEDULER_OP::poll() {
|
|||
backoff(project,"");
|
||||
if ((project->nrpc_failures % MASTER_FETCH_PERIOD) == 0) {
|
||||
project->master_url_fetch_pending = true;
|
||||
}
|
||||
project->min_rpc_time = 0;
|
||||
project->nrpc_failures = 0;
|
||||
}
|
||||
if (must_get_work) {
|
||||
project = gstate.next_project(project);
|
||||
if (project) {
|
||||
if( (retval=init_op_project(gstate.work_needed_secs())) ) {
|
||||
if( (retval=init_op_project(gstate.work_needed_secs())) ) {
|
||||
sprintf( err_msg,
|
||||
"scheduler init_op_project to %s failed, error %d\n",
|
||||
project->scheduler_urls[url_index].text, retval
|
||||
|
@ -309,7 +318,8 @@ bool SCHEDULER_OP::poll() {
|
|||
} else {
|
||||
scheduler_op_done = true;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
scheduler_op_done = true;
|
||||
}
|
||||
}
|
||||
|
@ -348,9 +358,9 @@ bool SCHEDULER_OP::poll() {
|
|||
if (scheduler_op_done) {
|
||||
project = gstate.next_project_master_pending();
|
||||
if (project) {
|
||||
init_master_fetch(project);
|
||||
init_master_fetch(project);
|
||||
} else {
|
||||
state = SCHEDULER_OP_STATE_IDLE;
|
||||
state = SCHEDULER_OP_STATE_IDLE;
|
||||
if (log_flags.sched_op_debug) {
|
||||
printf("Scheduler_op: return to idle state\n");
|
||||
}
|
||||
|
|
|
@ -36,11 +36,11 @@
|
|||
|
||||
// constants related to scheduler RPC policy
|
||||
|
||||
#define MASTER_FETCH_PERIOD 10
|
||||
#define MASTER_FETCH_PERIOD 5
|
||||
// fetch and parse master URL if nrpc_failures is a multiple of this
|
||||
#define RETRY_BASE_PERIOD 100
|
||||
#define RETRY_BASE_PERIOD 1
|
||||
// after failure, back off 2^nrpc_failures times this times random
|
||||
#define RETRY_CAP 10
|
||||
#define RETRY_CAP 5
|
||||
// cap on nrpc_failures in the above formula
|
||||
|
||||
#define SCHEDULER_OP_STATE_IDLE 0
|
||||
|
|
Loading…
Reference in New Issue