diff --git a/checkin_notes b/checkin_notes index 14248f2eed..6fa1e6731f 100755 --- a/checkin_notes +++ b/checkin_notes @@ -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 diff --git a/sched/sched_send.C b/sched/sched_send.C index a3af1f1649..858cac9e41 100644 --- a/sched/sched_send.C +++ b/sched/sched_send.C @@ -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, diff --git a/sched/server_types.h b/sched/server_types.h index d76482c7cd..0005af60fc 100644 --- a/sched/server_types.h +++ b/sched/server_types.h @@ -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); };