Update the handling of tmux exit.

This commit is contained in:
Darko
2015-06-15 13:06:14 +02:00
parent 619993abbc
commit 3e113d67af
3 changed files with 21 additions and 4 deletions
@@ -353,10 +353,18 @@ while ($runVar['counts']['iterations'] > 0) {
$tRun->runPane('notrunning', $runVar);
}
$runVar['counts']['iterations']++;
sleep(10);
$exit = $pdo->getSetting('tmux.run.exit');
if ($exit == 0) {
$runVar['counts']['iterations']++;
sleep(10);
} else {
// Set counter to less than one so the loop will exit.
$runVar['counts']['iterations'] = ($exit < 0) ? $exit : 0;
}
}
// TODO add code here to handle all panes shutting down before closing.
function errorOnSQL($pdo)
{
echo $pdo->log->error(PHP_EOL . "Monitor encountered severe errors retrieving process data from MySQL. Please diagnose and try running again." . PHP_EOL);