mirror of https://github.com/BOINC/boinc.git
- scheduler: add "distinct_beta_apps" option;
lets users filter out beta apps as well as others (from Nicolas Maire) svn path=/trunk/boinc/; revision=14971
This commit is contained in:
parent
c9b563f066
commit
ee0ca3973c
|
@ -2729,3 +2729,12 @@ David Mar 27 2008
|
|||
|
||||
db/
|
||||
schema.sql
|
||||
|
||||
David Mar 27 2008
|
||||
- scheduler: add "distinct_beta_apps" option;
|
||||
lets users filter out beta apps as well as others
|
||||
(from Nicolas Maire)
|
||||
|
||||
sched/
|
||||
sched_send.C
|
||||
sched_config.C,h
|
||||
|
|
|
@ -138,6 +138,7 @@ int SCHED_CONFIG::parse(FILE* f) {
|
|||
if (xp.parse_double(tag, "reliable_reduced_delay_bound", reliable_reduced_delay_bound)) continue;
|
||||
if (xp.parse_int(tag, "grace_period_hours", grace_period_hours)) continue;
|
||||
if (xp.parse_int(tag, "delete_delay_hours", delete_delay_hours)) continue;
|
||||
if (xp.parse_bool(tag, "distinct_beta_apps", distinct_beta_apps)) continue;
|
||||
if (xp.parse_bool(tag, "workload_sim", workload_sim)) continue;
|
||||
if (xp.parse_bool(tag, "ended", ended)) continue;
|
||||
if (xp.parse_int(tag, "shmem_work_items", shmem_work_items)) continue;
|
||||
|
|
|
@ -97,6 +97,8 @@ public:
|
|||
// Reduce the delay bounds for reliable hosts by this percent
|
||||
int granted_credit_ramp_up;
|
||||
double granted_credit_weight;
|
||||
bool distinct_beta_apps;
|
||||
// allow users to select beta apps independently
|
||||
bool workload_sim;
|
||||
// Do workload simulation in deciding whether to send a result
|
||||
bool ended;
|
||||
|
|
|
@ -374,10 +374,10 @@ static int get_host_info(SCHEDULER_REPLY& reply) {
|
|||
|
||||
pos = str.find("<app_id>", pos) + 1;
|
||||
}
|
||||
if (parse_bool(buf,"<allow_non_preferred_apps>", flag)) {
|
||||
if (parse_bool(buf,"allow_non_preferred_apps", flag)) {
|
||||
reply.wreq.host_info.allow_non_preferred_apps = flag;
|
||||
}
|
||||
if (parse_bool(buf,"<allow_beta_work>", flag)) {
|
||||
if (parse_bool(buf,"allow_beta_work", flag)) {
|
||||
reply.wreq.host_info.allow_beta_work = flag;
|
||||
}
|
||||
|
||||
|
@ -441,9 +441,9 @@ static inline int check_app_filter(
|
|||
break;
|
||||
}
|
||||
}
|
||||
// TODO: select between the following via config
|
||||
//if (!app_allowed) {
|
||||
if (!app_allowed && reply.wreq.user_apps_only && !reply.wreq.beta_only) {
|
||||
if (!app_allowed && reply.wreq.user_apps_only &&
|
||||
(!reply.wreq.beta_only || config.distinct_beta_apps)
|
||||
) {
|
||||
reply.wreq.no_allowed_apps_available = true;
|
||||
log_messages.printf(MSG_DEBUG,
|
||||
"[USER#%d] [WU#%d] user doesn't want work for this application\n",
|
||||
|
@ -1045,7 +1045,7 @@ void send_work(SCHEDULER_REQUEST& sreq, SCHEDULER_REPLY& reply) {
|
|||
|
||||
get_host_info(reply); // parse project prefs for app details
|
||||
reply.wreq.beta_only = false;
|
||||
reply.wreq.user_apps_only=true;
|
||||
reply.wreq.user_apps_only = true;
|
||||
|
||||
log_messages.printf(MSG_DEBUG,
|
||||
"[HOST#%d] got request for %f seconds of work; available disk %f GB\n",
|
||||
|
|
Loading…
Reference in New Issue