- translation.inc: backed out change of 7 May;

we need to use " to expand $PROJECT var
- scheduler:
    take work_buf_min into account in deciding whether
    a result will be reported by its deadline.
- all back end programs:
    better error message if can't parse config file

html/inc/
    translation.inc
sched/
    *.C

svn path=/trunk/boinc/; revision=12652
This commit is contained in:
David Anderson 2007-05-11 16:30:13 +00:00
parent 1bf67eddda
commit 0daa5a8802
16 changed files with 65 additions and 21 deletions

View File

@ -4832,3 +4832,17 @@ Charlie 10 May 2007
ViewResources.cpp, h
common/
wxPieCtrl.cpp, h
David 11 May 2007
- translation.inc: backed out change of 7 May;
we need to use " to expand $PROJECT var
- scheduler:
take work_buf_min into account in deciding whether
a result will be reported by its deadline.
- all back end programs:
better error message if can't parse config file
html/inc/
translation.inc
sched/
*.C

View File

@ -140,7 +140,7 @@ function buildLanguages($langdir,$transdir,$prjtransdir,$compdir){
for ($i=0;$i<sizeof($interface);$i++){
if (isset($keys[$i]) && isset($language[$keys[$i]]) && $language[$keys[$i]]!="") {
//Translate to PHP
fwrite($fh, "\$language_lookup_array[".$keys[$i]."] = '".addslashes($language[$keys[$i]])."';\n");
fwrite($fh, "\$language_lookup_array[".$keys[$i]."] = \"".addslashes($language[$keys[$i]])."\";\n");
}
}
fwrite($fh, '?>');
@ -190,7 +190,7 @@ function buildLanguages($langdir,$transdir,$prjtransdir,$compdir){
$keys = array_keys($language);
for ($i=0;$i<sizeof($interface);$i++){
if ($language[$keys[$i]]!="") {
fwrite($fh, "\$language_lookup_array[".($real_interface_size+$keys[$i])."] = '".addslashes($language[$keys[$i]])."';\n"); //Translate to PHP
fwrite($fh, "\$language_lookup_array[".($real_interface_size+$keys[$i])."] = \"".addslashes($language[$keys[$i]])."\";\n"); //Translate to PHP
}
}
fwrite($fh, '?>');

View File

@ -33,6 +33,8 @@
#include "boinc_db.h"
#include "parse.h"
#include "util.h"
#include "str_util.h"
#include "sched_config.h"
#include "sched_util.h"
#include "sched_msgs.h"
@ -189,7 +191,9 @@ int main(int argc, char** argv) {
retval = config.parse_file("..");
if (retval) {
log_messages.printf(SCHED_MSG_LOG::MSG_CRITICAL, "Can't parse config file\n");
log_messages.printf(SCHED_MSG_LOG::MSG_CRITICAL,
"Can't parse ../config.xml: %s\n", boincerror(retval)
);
exit(1);
}

View File

@ -65,6 +65,7 @@
#include "boinc_db.h"
#include "filesys.h"
#include "util.h"
#include "str_util.h"
#include "error_numbers.h"
#include "md5_file.h"
#include "parse.h"
@ -811,7 +812,9 @@ int main(int argc, char** argv) {
retval = config.parse_file("..");
if (retval) {
log_messages.printf(SCHED_MSG_LOG::MSG_CRITICAL, "Can't parse config file\n");
log_messages.printf(SCHED_MSG_LOG::MSG_CRITICAL,
"Can't parse ../config.xml: %s\n", boincerror(retval)
);
exit(1);
}
retval = boinc_db.open(

View File

@ -36,6 +36,8 @@
#include <string.h>
#include "boinc_db.h"
#include "str_util.h"
#include "sched_config.h"
#include "sched_util.h"
@ -103,7 +105,7 @@ int main(int argc, char** argv) {
// parse the configuration file to get database information
retval = config.parse_file(".");
if (retval) {
fprintf(stderr, "Can't parse config file: %d\n", retval);
fprintf(stderr, "Can't parse ../config.xml: %s\n", boincerror(retval));
exit(1);
}

View File

@ -101,6 +101,8 @@ using std::vector;
#include "error_numbers.h"
#include "synch.h"
#include "util.h"
#include "str_util.h"
#include "sched_config.h"
#include "sched_shmem.h"
#include "sched_util.h"
@ -512,7 +514,9 @@ int main(int argc, char** argv) {
retval = config.parse_file("..");
if (retval) {
log_messages.printf(SCHED_MSG_LOG::MSG_CRITICAL, "can't parse config file\n");
log_messages.printf(SCHED_MSG_LOG::MSG_CRITICAL,
"Can't parse ../config.xml: %s\n", boincerror(retval)
);
exit(1);
}

View File

@ -584,7 +584,7 @@ int main(int argc, char** argv) {
retval = config.parse_file("..");
if (retval) {
log_messages.printf(SCHED_MSG_LOG::MSG_CRITICAL,
"Can't parse config file\n"
"Can't parse ../config.xml: %s\n", boincerror(retval)
);
exit(1);
}

View File

@ -33,13 +33,15 @@
#endif
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "boinc_db.h"
#include "util.h"
#include "str_util.h"
#include "sched_config.h"
#include "sched_util.h"
#include "md5_file.h"
#include "util.h"
SCHED_CONFIG config;
@ -179,7 +181,7 @@ int main(int argc, char** argv) {
retval = config.parse_file(".");
if (retval) {
fprintf(stderr, "Can't parse config file: %d\n", retval);
fprintf(stderr, "Can't parse ../config.xml: %s\n", boincerror(retval));
exit(1);
}

View File

@ -47,6 +47,7 @@ using namespace std;
#include "error_numbers.h"
#include "shmem.h"
#include "util.h"
#include "str_util.h"
#include "sched_config.h"
#include "server_types.h"
@ -293,7 +294,7 @@ int main(int argc, char** argv) {
retval = config.parse_file("..");
if (retval) {
log_messages.printf(SCHED_MSG_LOG::MSG_CRITICAL,
"Can't parse config file\n"
"Can't parse ../config.xml: %s\n", boincerror(retval)
);
send_message("Server can't parse configuration file", 3600, true);
exit(0);

View File

@ -34,6 +34,8 @@ using namespace std;
#include "boinc_db.h"
#include "util.h"
#include "str_util.h"
#include "sched_config.h"
#include "sched_util.h"
#include "sched_msgs.h"
@ -139,7 +141,7 @@ int main(int argc, char** argv) {
retval = config.parse_file("..");
if (retval) {
log_messages.printf(SCHED_MSG_LOG::MSG_CRITICAL,
"Can't parse config file: %d\n", retval
"Can't parse ../config.xml: %s\n", boincerror(retval)
);
exit(1);
}

View File

@ -33,6 +33,8 @@
#include <time.h>
#include "boinc_db.h"
#include "str_util.h"
#include "sched_config.h"
#include "sched_util.h"
@ -97,7 +99,7 @@ int main(int argc, char** argv) {
retval = config.parse_file(".");
if (retval) {
fprintf(stderr, "Can't parse config file: %d\n", retval);
fprintf(stderr, "Can't parse ../config.xml: %s\n", boincerror(retval));
exit(1);
}

View File

@ -381,7 +381,9 @@ static inline void check_deadline(WORKUNIT& wu, SCHEDULER_REQUEST& request, SCHE
//
if (!config.ignore_delay_bound && request.estimated_delay>0) {
double ewd = estimate_wallclock_duration(wu, request, reply);
if (request.estimated_delay + ewd > wu.delay_bound) {
double est_completion_delay = request.estimated_delay + ewd;
double est_report_delay = max(est_completion_delay, request.global_prefs.work_buf_min());
if (est_report_delay> wu.delay_bound) {
log_messages.printf(
SCHED_MSG_LOG::MSG_DEBUG,
"[WU#%d %s] needs %d seconds on [HOST#%d]; delay_bound is %d (request.estimated_delay is %f)\n",

View File

@ -32,13 +32,15 @@
#endif
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "boinc_db.h"
#include "util.h"
#include "str_util.h"
#include "md5_file.h"
#include "sched_config.h"
#include "sched_util.h"
#include "md5_file.h"
#include "util.h"
SCHED_CONFIG config;
@ -198,7 +200,7 @@ int main(int argc, char** argv) {
}
retval = config.parse_file(".");
if (retval) {
fprintf(stderr, "Can't parse config file: %d\n", retval);
fprintf(stderr, "Can't parse ../config.xml: %s\n", boincerror(retval));
exit(1);
}

View File

@ -140,7 +140,7 @@ int main(int argc, char** argv) {
retval = config.parse_file("..");
if (retval) {
log_messages.printf(SCHED_MSG_LOG::CRITICAL,
"Can't parse config file: %d\n", retval
"Can't parse ../config.xml: %s\n", boincerror(retval)
);
exit(1);
}

View File

@ -35,6 +35,8 @@
#include "boinc_db.h"
#include "util.h"
#include "str_util.h"
#include "sched_config.h"
#include "sched_util.h"
#include "sched_msgs.h"
@ -178,7 +180,9 @@ int main(int argc, char** argv) {
retval = config.parse_file("..");
if (retval) {
log_messages.printf(SCHED_MSG_LOG::MSG_CRITICAL, "Can't parse config file\n");
log_messages.printf(SCHED_MSG_LOG::MSG_CRITICAL,
"Can't parse ../config.xml: %s\n", boincerror(retval)
);
exit(1);
}
retval = boinc_db.open(config.db_name, config.db_host, config.db_user, config.db_passwd);

View File

@ -42,7 +42,9 @@ using namespace std;
#include "boinc_db.h"
#include "util.h"
#include "str_util.h"
#include "error_numbers.h"
#include "sched_config.h"
#include "sched_util.h"
#include "sched_msgs.h"
@ -721,7 +723,7 @@ int main(int argc, char** argv) {
retval = config.parse_file("..");
if (retval) {
log_messages.printf(SCHED_MSG_LOG::MSG_CRITICAL,
"Can't parse config file: %d\n", retval
"Can't parse ../config.xml: %s\n", boincerror(retval)
);
exit(1);
}