Merge pull request #141 from DariusIII/tmux-server-bug-test

Tmux server bug test
This commit is contained in:
DariusIII
2014-02-13 12:51:38 +01:00
+12 -32
View File
@@ -7,7 +7,7 @@ require_once("../test/ColorCLI.php");
require_once("../test/showsleep.php");
$version="0.3r673";
$version="0.3r680";
$db = new DB();
$s = new Sites();
@@ -1415,88 +1415,68 @@ if ($array ['FIXRELEASES'] = "true") {
shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:3.7 'echo \"\033[38;5;\"$color\"m\n$panes3[7] Has no work to process \" && date +\"%D %T\"' 2>&1 1> /dev/null");
}
//run fixReleaseNames and jonnyboys jb_fix_names.php and removeCrapReleases in pane 4.0
if (( $array['MAX_LOAD'] >= get_load()) && (( TIME() - $time27 ) >= $array['FIXRELEASES_TIMER'] ) && ( $array['FIXRELEASES'] == "true" )) {
//run fixReleaseNames and jonnyboys jb_fix_names.php in pane 4.0
if (( $array['MAX_LOAD'] >= get_load()) && ( $array['FIXRELEASES'] == "true" )) {
$color = get_color();
$log = writelog($panes4[0]);
shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.0 'echo \"\033[38;5;\"$color\"m\" && $ds1 $panes4[0] $ds2 && cd $_test && $_php fixReleaseNames.php 1 true other yes show 2>&1 $log && $_php fixReleaseNames.php 3 true other yes show 2>&1 $log && $_php fixReleaseNames.php 5 true other yes show 2>&1 $log && $_php fixReleaseNames.php 7 true other yes show 2>&1 $log && $_php hash_decrypt.php 1000 2>&1 $log && $_php jb_fix_names.php 6 show 2>&1 $log echo \" \033[1;0;33m\" && $ds1 $panes4[0] $ds3' 2>&1 1> /dev/null");
shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.0 'echo \"\033[38;5;\"$color\"m\" && $ds1 $panes4[0] $ds2 && cd $_test && $_php fixReleaseNames.php 3 true other yes show 2>&1 $log && $_php fixReleaseNames.php 5 true other yes show 2>&1 $log && $_php fixReleaseNames.php 7 true other yes show 2>&1 $log && $_php hash_decrypt.php 1000 2>&1 $log && $_php jb_fix_names.php 6 show 2>&1 $log echo \" \033[1;0;33m\" && $_sleep {$array ['FIXRELEASES_TIMER']} && $ds1 $panes4[0] $ds3' 2>&1 1> /dev/null");
$time27 = TIME();}
elseif ( $array['FIXRELEASES'] != "true" ) {
$color = get_color();
shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.0 'echo \"\033[38;5;\"$color\"m\n$panes4[0] Disabled by fixReleaseNames\" && date +\"%D %T\"' 2>&1 1> /dev/null");
} elseif (( $array['FIXRELEASES'] == "true" ) && ( $array['MAX_LOAD'] >= get_load())) {
$color = get_color();
$run_time = relativeTime( $array['FIXRELEASES_TIMER'] + $time27 );
shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.0 'echo \"\033[38;5;\"$color\"m\n$panes4[0] will run in T[ $run_time]\" && date +\"%D %T\"' 2>&1 1> /dev/null");
} elseif ( $array['MAX_LOAD'] <= get_load()) {
$color = get_color();
shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.0 'echo \"\033[38;5;\"$color\"m\n$panes4[0] Disabled by MAX_LOAD\" && date +\"%D %T\"' 2>&1 1> /dev/null");
}
//run predb_hash_decrypt.php in pane 4.1
if (( $array['MAX_LOAD'] >= get_load()) && (( TIME() - $time28 ) >= $array['PREDBHASH_TIMER'] ) &&( $array['PREDBHASH'] == "true" )) {
if (( $array['MAX_LOAD'] >= get_load()) &&( $array['PREDBHASH'] == "true" )) {
$color = get_color();
$log = writelog($panes4[1]);
shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.1 'echo \"\033[38;5;\"$color\"m\" && $ds1 $panes4[1] $ds2 && cd $_test && $_php predb_hash_decrypt.php 1000 2>&1 $log && echo \" \033[1;0;33m\" && $ds1 $panes4[1] $ds3' 2>&1 1> /dev/null");
shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.1 'echo \"\033[38;5;\"$color\"m\" && $ds1 $panes4[1] $ds2 && cd $_test && $_php predb_hash_decrypt.php 1000 2>&1 $log && echo \" \033[1;0;33m\" && $_sleep {$array ['PREDBHASH_TIMER']} && $ds1 $panes4[1] $ds3' 2>&1 1> /dev/null");
$time28 = TIME();
} elseif ( $array['PREDBHASH'] != "true" ) {
$color = get_color();
shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.1 'echo \"\033[38;5;\"$color\"m\n$panes4[1] Disabled by PREDBHASH\" && date +\"%D %T\"' 2>&1 1> /dev/null");
} elseif (( $array['PREDBHASH'] == "true" ) && ( $array['MAX_LOAD'] >= get_load())) {
$color = get_color();
$run_time = relativeTime( $array['PREDBHASH_TIMER'] + $time28 );
shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.1 'echo \"\033[38;5;\"$color\"m\n$panes4[1] will run in T[ $run_time]\" && date +\"%D %T\"' 2>&1 1> /dev/null");
} elseif ( $array['MAX_LOAD'] <= get_load()) {
$color = get_color();
shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.1 'echo \"\033[38;5;\"$color\"m\n$panes4[1] Disabled by MAX_LOAD\" && date +\"%D %T\"' 2>&1 1> /dev/null");
}
//run requestID in pane 4.2
if (( $array['MAX_LOAD'] >= get_load()) && (( TIME() - $time30 ) >= $array['REQID_TIMER'] ) && ( $array['REQID'] == "true" )) {
if (( $array['MAX_LOAD'] >= get_load()) && ( $array['REQID'] == "true" )) {
$color = get_color();
$log = writelog($panes4[2]);
shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.2 'echo \"\033[38;5;\"$color\"m\" && $ds1 $panes4[2] $ds2 && cd $_test && $_php requestID.php 1000 true 2>&1 $log echo \" \033[1;0;33m\" && $ds1 $panes4[2] $ds3' 2>&1 1> /dev/null");
shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.2 'echo \"\033[38;5;\"$color\"m\" && $ds1 $panes4[2] $ds2 && cd $_test && $_php requestID.php 1000 true 2>&1 $log && echo \" \033[1;0;33m\" && $_sleep {$array['REQID_TIMER']} && $ds1 $panes4[2] $ds3' 2>&1 1> /dev/null");
$time30 = TIME();}
elseif ( $array['REQID'] != "true" ) {
$color = get_color();
shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.2 'echo \"\033[38;5;\"$color\"m\n$panes4[2] Disabled by RequestID\" && date +\"%D %T\"' 2>&1 1> /dev/null");
} elseif (( $array['REQID'] == "true" ) && ( $array['MAX_LOAD'] >= get_load())) {
$color = get_color();
$run_time = relativeTime( $array['REQID_TIMER'] + $time30 );
shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.2 'echo \"\033[38;5;\"$color\"m\n$panes4[2] will run in T[ $run_time]\" && date +\"%D %T\"' 2>&1 1> /dev/null");
} elseif ( $array['MAX_LOAD'] <= get_load()) {
$color = get_color();
shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.2 'echo \"\033[38;5;\"$color\"m\n$panes4[2] Disabled by MAX_LOAD\" && date +\"%D %T\"' 2>&1 1> /dev/null");
}
//run removeCrap.php in pane 4.3
if (( $array['MAX_LOAD'] >= get_load()) && (( TIME() - $time31 ) >= $array['REMOVECRAP_TIMER'] ) && ( $array['REMOVECRAP'] == "true" )) {
if (( $array['MAX_LOAD'] >= get_load()) && ( $array['REMOVECRAP'] == "true" )) {
$color = get_color();
$log = writelog($panes4[3]);
shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.3 'echo \"\033[38;5;\"$color\"m\" && $ds1 $panes4[3] $ds2 && cd $_test && $_php removeCrapReleases.php true 2 2>&1 $log echo \" \033[1;0;33m\" && $ds1 $panes4[3] $ds3' 2>&1 1> /dev/null");
shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.3 'echo \"\033[38;5;\"$color\"m\" && $ds1 $panes4[3] $ds2 && cd $_test && $_php removeCrapReleases.php true 2 2>&1 $log echo \" \033[1;0;33m\" && $_sleep {$array['REMOVECRAP_TIMER']} && $ds1 $panes4[3] $ds3' 2>&1 1> /dev/null");
$time31 = TIME();}
elseif ( $array['REMOVECRAP'] != "true" ) {
$color = get_color();
shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.3 'echo \"\033[38;5;\"$color\"m\n$panes4[3] Disabled by RemoveCrap\" && date +\"%D %T\"' 2>&1 1> /dev/null");
} elseif (( $array['REMOVECRAP'] == "true" ) && ( $array['MAX_LOAD'] >= get_load())) {
$color = get_color();
$run_time = relativeTime( $array['REMOVECRAP_TIMER'] + $time31 );
shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.3 'echo \"\033[38;5;\"$color\"m\n$panes4[3] will run in T[ $run_time]\" && date +\"%D %T\"' 2>&1 1> /dev/null");
} elseif ( $array['MAX_LOAD'] <= get_load()) {
$color = get_color();
shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.3 'echo \"\033[38;5;\"$color\"m\n$panes4[3] Disabled by MAX_LOAD\" && date +\"%D %T\"' 2>&1 1> /dev/null");
}
//run postprocess_pre.php in pane 4.4
if (( $array['MAX_LOAD'] >= get_load()) && (( TIME() - $time32 ) >= $array['UPPRE_TIMER'] ) && ( $array['UPPRE'] == "true" )) {
if (( $array['MAX_LOAD'] >= get_load()) && ( $array['UPPRE'] == "true" )) {
$color = get_color();
$log = writelog($panes4[4]);
shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.4 'echo \"\033[38;5;\"$color\"m\" && $ds1 $panes4[4] $ds2 && cd $_test && $_php postprocess_pre.php 2>&1 $log echo \" \033[1;0;33m\" && $ds1 $panes4[4] $ds3' 2>&1 1> /dev/null");
shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.4 'echo \"\033[38;5;\"$color\"m\" && $ds1 $panes4[4] $ds2 && cd $_test && $_php postprocess_pre.php 2>&1 $log && echo \" \033[1;0;33m\" && $_sleep {$array['UPPRE_TIMER']} && $ds1 $panes4[4] $ds3' 2>&1 1> /dev/null");
$time32 = TIME();}
elseif ( $array['UPPRE'] != "true" ) {
$color = get_color();
shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.4 'echo \"\033[38;5;\"$color\"m\n$panes4[4] Disabled by Update_Prehash\" && date +\"%D %T\"' 2>&1 1> /dev/null");
} elseif (( $array['UPPRE'] == "true" ) && ( $array['MAX_LOAD'] >= get_load())) {
$color = get_color();
$run_time = relativeTime( $array['UPPRE_TIMER'] + $time32 );
shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.4 'echo \"\033[38;5;\"$color\"m\n$panes4[4] will run in T[ $run_time]\" && date +\"%D %T\"' 2>&1 1> /dev/null");
} elseif ( $array['MAX_LOAD'] <= get_load()) {
$color = get_color();
shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.4 'echo \"\033[38;5;\"$color\"m\n$panes4[4] Disabled by MAX_LOAD\" && date +\"%D %T\"' 2>&1 1> /dev/null");