When daily result quota exceeded, tell users what its value is for that host.

svn path=/trunk/boinc/; revision=5493
This commit is contained in:
Bruce Allen 2005-02-22 17:53:17 +00:00
parent b3f75a8aee
commit 0f6202fc9e
3 changed files with 12 additions and 5 deletions

View File

@ -25126,9 +25126,10 @@ Bruce 22 Feb 2005
- Send multi-message replies to core clients > 4.19
- Change 'no work available' message to 'no work sent' since this is often due
to constraints at the client end, NOT lack of work at project end.
- When daily result quota exceeded, tell users what its value is for that host.
sched/
sched_locality.C
sched_send.C
server_types.C
server_types.h

View File

@ -534,8 +534,12 @@ bool SCHEDULER_REPLY::work_needed(bool locality_sched) {
}
if (wreq.nresults >= config.max_wus_to_send) return false;
if (config.daily_result_quota) {
int n_cpus=host.p_ncpus<4?host.p_ncpus:4;
if (host.nresults_today >= config.daily_result_quota*n_cpus) {
if (host.p_ncpus<4) {
wreq.daily_result_quota=host.p_ncpus*config.daily_result_quota;
} else {
wreq.daily_result_quota=4*config.daily_result_quota;
}
if (host.nresults_today >= wreq.daily_result_quota) {
wreq.daily_result_quota_exceeded = true;
return false;
}
@ -910,7 +914,9 @@ int send_work(
);
}
if (reply.wreq.daily_result_quota_exceeded) {
USER_MESSAGE um("(daily quota exceeded)", "high");
char helpful[256];
sprintf(helpful, "(daily quota of %d WU reached)", reply.wreq.daily_result_quota);
USER_MESSAGE um(helpful, "high");
reply.insert_message(um);
log_messages.printf(
SCHED_MSG_LOG::NORMAL,

View File

@ -46,7 +46,7 @@ struct WORK_REQ {
bool homogeneous_redundancy_reject;
bool outdated_core;
bool daily_result_quota_exceeded;
int daily_result_quota; // for this machine: number of cpus * daily_quota/cpu
void update_for_result(double seconds_filled);
};