client: don't ask an NCI project for work if current job still uploading

Note: we currently assume NCI projects have only 1 app.
Removing this assumption would be a little work.
This commit is contained in:
David Anderson 2013-05-22 14:33:37 -07:00
parent 0983315cdb
commit 73bd46c3fa
1 changed files with 3 additions and 2 deletions

View File

@ -84,13 +84,14 @@ void set_no_rsc_config() {
}
}
// does the project have a downloading or runnable job?
// does the project have a job that's not ready to report?
// (don't request another job from NCI project if so)
//
static bool has_a_job(PROJECT* p) {
for (unsigned int j=0; j<gstate.results.size(); j++) {
RESULT* rp = gstate.results[j];
if (rp->project != p) continue;
if (rp->state() <= RESULT_FILES_DOWNLOADED) {
if (rp->state() <= RESULT_FILES_UPLOADED) {
return true;
}
}