mirror of https://github.com/BOINC/boinc.git
client: if idle instance, fetch work even if uploading
This commit is contained in:
parent
dbbe474b77
commit
47562339e3
|
@ -410,6 +410,22 @@ static inline bool actively_uploading(PROJECT* p) {
|
|||
return false;
|
||||
}
|
||||
|
||||
// If there is a request for an idle instance, return true.
|
||||
// Clear other requests
|
||||
//
|
||||
static inline bool idle_request() {
|
||||
bool found = false;
|
||||
for (int i=0; i<coprocs.n_rsc; i++) {
|
||||
RSC_WORK_FETCH &rwf = rsc_work_fetch[i];
|
||||
if (rwf.req_instances) {
|
||||
found = true;
|
||||
} else {
|
||||
rwf.req_secs = 0;
|
||||
}
|
||||
}
|
||||
return found;
|
||||
}
|
||||
|
||||
// Called once/sec.
|
||||
// Initiate scheduler RPC activity if needed and possible
|
||||
//
|
||||
|
@ -514,6 +530,7 @@ bool CLIENT_STATE::scheduler_rpc_poll() {
|
|||
p = work_fetch.choose_project();
|
||||
if (p) {
|
||||
if (actively_uploading(p)) {
|
||||
if (!idle_request()) {
|
||||
if (log_flags.work_fetch_debug) {
|
||||
msg_printf(p, MSG_INFO,
|
||||
"[work_fetch] deferring work fetch; upload active"
|
||||
|
@ -522,6 +539,7 @@ bool CLIENT_STATE::scheduler_rpc_poll() {
|
|||
p->sched_rpc_pending = 0;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
scheduler_op->init_op_project(p, RPC_REASON_NEED_WORK);
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue