X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2Fbriskin5%2Findex_rd.php;h=6732873b804870270256b543eda005dd401d05cc;hb=45fd3084c52ef5c560300fa32a2fef75edc47ca7;hp=c141dc8cf1179350bf575673f2c1184e22026d67;hpb=b69edecb81b57155e62fb35ff594873a43560bda;p=brisk.git diff --git a/web/briskin5/index_rd.php b/web/briskin5/index_rd.php index c141dc8..6732873 100644 --- a/web/briskin5/index_rd.php +++ b/web/briskin5/index_rd.php @@ -1,6 +1,6 @@ 0, + 'U_heavy' => 0, + 'R_garbage' => 0, + 'R_minusone' => 0, + 'R_the_end' => 0 ); + // Use of proxies isn't allowed. // if (is_proxy()) { // sleep(5); @@ -82,13 +88,11 @@ function maincheck($sess, $cur_stat, $cur_subst, $cur_step, &$new_stat, &$new_su $user = FALSE; $curtime = time(); - if (($proxy_step = Bin5_user::step_get($sess)) == FALSE) { + if (($proxy_step = Bin5_user::load_step($sess)) == FALSE) { log_only2("R"); return (FALSE); } - error_log("maincheck: step di i [".$proxy_step['i']."]", 0); - // log_rd2("M"); /* Sync check (read only without modifications */ ignore_user_abort(TRUE); @@ -96,13 +100,15 @@ function maincheck($sess, $cur_stat, $cur_subst, $cur_step, &$new_stat, &$new_su if (($sem = Bin5::lock_data($table_idx)) != FALSE) { // Aggiorna l'expire time lato server $S_load_stat['U_first_loop']++; + if (($user = Bin5_user::load_data($table_idx, $proxy_step['i'], $sess)) == FALSE) { Bin5::unlock_data(); ignore_user_abort(FALSE); return (unrecerror()); } $user->lacc = $curtime; - Bin5_user::save_data($user, $proxy_step['i'], $user->idx); + + Bin5_user::save_data($user, $table_idx, $user->idx); if (Bin5::garbage_time_is_expired($curtime)) { log_only("F"); @@ -148,8 +154,6 @@ function maincheck($sess, $cur_stat, $cur_subst, $cur_step, &$new_stat, &$new_su log_lock("P"); $S_load_stat['U_heavy']++; - // if (($bri = &Bin5::load_data($table_idx, $table_token)) == FALSE) - // if (($user = Bin5_user::load_data($table_idx, $table_token)) == FALSE) if (($user = Bin5_user::load_data($table_idx, $proxy_step['i'], $sess)) == FALSE) { break; } @@ -358,6 +362,12 @@ for ($i = 0 ; time() < $endtime ; $i++) { echo '_'; flush(); } + } + +$s = "[".$sess."] briskin5/index_rd.php stats: "; +foreach ($S_load_stat as $key => $value) { + $s .= sprintf("%s: %d - ", $key, $value); } +log_crit($s); ?>