- fix client simulator

- web: if DB server down, say so


svn path=/trunk/boinc/; revision=18554
This commit is contained in:
David Anderson 2009-07-06 16:33:02 +00:00
parent e4cae83866
commit 13c647ece8
3 changed files with 20 additions and 2 deletions

View File

@ -6181,3 +6181,12 @@ David 1 July 2009
sched/ sched/
pymw_assimilator.py pymw_assimilator.py
David 6 July 2009
- fix client simulator
- web: if DB server down, say so
client/
sim_util.cpp
html/inc/
boinc_db.inc

View File

@ -31,6 +31,8 @@
// If dirs are specified, chdir into each directory in sequence, // If dirs are specified, chdir into each directory in sequence,
// do the above for each one, and write summary info to stdout // do the above for each one, and write summary info to stdout
#include <math.h>
#include "error_numbers.h" #include "error_numbers.h"
#include "str_util.h" #include "str_util.h"
#include "str_replace.h" #include "str_replace.h"
@ -284,7 +286,6 @@ ACTIVE_TASK::ACTIVE_TASK() {
graphics_mode_ack_timeout = 0; graphics_mode_ack_timeout = 0;
quit_time = 0; quit_time = 0;
fraction_done = 0; fraction_done = 0;
episode_start_cpu_time = 0;
run_interval_start_wall_time = gstate.now; run_interval_start_wall_time = gstate.now;
checkpoint_cpu_time = 0; checkpoint_cpu_time = 0;
checkpoint_wall_time = 0; checkpoint_wall_time = 0;

View File

@ -64,12 +64,20 @@ class BoincDb extends DbConn {
static function get($readonly = false) { static function get($readonly = false) {
if (!isset(self::$instance)) { if (!isset(self::$instance)) {
if (web_stopped()) { if (web_stopped()) {
show_page("Project down for maintenence", show_page("Project down for maintenance",
"Please check back in a few hours." "Please check back in a few hours."
); );
exit; exit;
} }
self::get_aux($readonly); self::get_aux($readonly);
if (!self::$instance) {
show_page(
"Project is down",
"The project's database server is down.
Please check back in a few hours."
);
exit;
}
} }
return self::$instance; return self::$instance;
} }