mirror of https://github.com/BOINC/boinc.git
- scheduler: host_app_version.n_jobs_today was being cleared
only if the previous request was on a different day AND the current request asks for work. Sometimes it wasn't getting cleared when it should have. svn path=/trunk/boinc/; revision=21824
This commit is contained in:
parent
2bc044bd05
commit
f7ce13cdd4
|
@ -4648,3 +4648,13 @@ David 25 Jun 2010
|
|||
|
||||
sched/
|
||||
handle_request.cpp
|
||||
|
||||
David 25 Jun 2010
|
||||
- scheduler: host_app_version.n_jobs_today was being cleared
|
||||
only if the previous request was on a different day
|
||||
AND the current request asks for work.
|
||||
Sometimes it wasn't getting cleared when it should have.
|
||||
|
||||
sched/
|
||||
sched_send.cpp,h
|
||||
handle_request.cpp
|
||||
|
|
|
@ -1229,6 +1229,7 @@ void process_request(char* code_sign_key) {
|
|||
handle_global_prefs();
|
||||
|
||||
read_host_app_versions();
|
||||
update_n_jobs_today();
|
||||
|
||||
handle_results();
|
||||
|
||||
|
|
|
@ -409,14 +409,23 @@ static void update_quota(DB_HOST_APP_VERSION& hav) {
|
|||
}
|
||||
|
||||
if (g_request->last_rpc_dayofyear != g_request->current_rpc_dayofyear) {
|
||||
log_messages.printf(MSG_DEBUG,
|
||||
"[HOST#%d] [HAV#%d] Resetting njobs_today\n",
|
||||
if (config.debug_quota) {
|
||||
log_messages.printf(MSG_INFO,
|
||||
"[quota] [HOST#%d] [HAV#%d] Resetting n_jobs_today\n",
|
||||
g_reply->host.id, hav.app_version_id
|
||||
);
|
||||
}
|
||||
hav.n_jobs_today = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void update_n_jobs_today() {
|
||||
for (unsigned int i=0; i<g_wreq->host_app_versions.size(); i++) {
|
||||
DB_HOST_APP_VERSION& hav = g_wreq->host_app_versions[i];
|
||||
update_quota(hav);
|
||||
}
|
||||
}
|
||||
|
||||
static void get_reliability_and_trust() {
|
||||
// Platforms other than Windows, Linux and Intel Macs need a
|
||||
// larger set of computers to be marked reliable
|
||||
|
@ -436,7 +445,6 @@ static void get_reliability_and_trust() {
|
|||
DB_HOST_APP_VERSION& hav = g_wreq->host_app_versions[i];
|
||||
get_reliability_version(hav, multiplier);
|
||||
set_trust(hav);
|
||||
update_quota(hav);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -71,5 +71,6 @@ extern bool work_needed(bool);
|
|||
extern void send_work_setup();
|
||||
extern int effective_ncpus();
|
||||
extern int preferred_app_message_index;
|
||||
extern void update_n_jobs_today();
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue