diff --git a/agc_2-X/trunk/bin/AST_DB_optimize.pl b/agc_2-X/trunk/bin/AST_DB_optimize.pl index 1db3a1d5..579ed663 100644 --- a/agc_2-X/trunk/bin/AST_DB_optimize.pl +++ b/agc_2-X/trunk/bin/AST_DB_optimize.pl @@ -169,6 +169,71 @@ $dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VA $sthA->finish(); } + $stmtA = "optimize table vicidial_campaign_stats;"; + if($DB){print STDERR "\n|$stmtA|\n";} + if (!$T) { + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + @aryA = $sthA->fetchrow_array; + if (!$Q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";} + $sthA->finish(); + } + + $stmtA = "optimize table vicidial_dnc;"; + if($DB){print STDERR "\n|$stmtA|\n";} + if (!$T) { + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + @aryA = $sthA->fetchrow_array; + if (!$Q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";} + $sthA->finish(); + } + + $stmtA = "optimize table vicidial_callbacks;"; + if($DB){print STDERR "\n|$stmtA|\n";} + if (!$T) { + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + @aryA = $sthA->fetchrow_array; + if (!$Q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";} + $sthA->finish(); + } + + $stmtA = "optimize table vicidial_agent_log;"; + if($DB){print STDERR "\n|$stmtA|\n";} + if (!$T) { + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + @aryA = $sthA->fetchrow_array; + if (!$Q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";} + $sthA->finish(); + } + + $stmtA = "optimize table vicidial_conferences;"; + if($DB){print STDERR "\n|$stmtA|\n";} + if (!$T) { + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + @aryA = $sthA->fetchrow_array; + if (!$Q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";} + $sthA->finish(); + } + + $stmtA = "optimize table vicidial_hopper;"; + if($DB){print STDERR "\n|$stmtA|\n";} + if (!$T) { + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + @aryA = $sthA->fetchrow_array; + if (!$Q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";} + $sthA->finish(); + } $dbhA->disconnect(); diff --git a/agc_2-X/trunk/bin/AST_flush_DBqueue.pl b/agc_2-X/trunk/bin/AST_flush_DBqueue.pl index e35df4ab..f2abcd7e 100644 --- a/agc_2-X/trunk/bin/AST_flush_DBqueue.pl +++ b/agc_2-X/trunk/bin/AST_flush_DBqueue.pl @@ -13,6 +13,7 @@ # CHANGES # 60717-1214 - changed to DBI by Marin Blu # 60717-1536 - changed to use /etc/astguiclient.conf for configs +# 60910-0238 - removed park_log query # $secX = time(); @@ -135,17 +136,6 @@ $dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VA if (!$T) { $affected_rows = $dbhA->do($stmtA);} if (!$Q) {print " - vicidial_manager 2 hour flush\n";} - $stmtA = "update park_log set status='HUNGUP' where hangup_time is not null;"; - if($DB){print STDERR "\n|$stmtA|\n";} - if (!$T) { - $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; - $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; - $sthA->finish(); - } - - if (!$Q) {print " - park_log HUNGUP flush \n";} - - $stmtA = "optimize table vicidial_manager;"; if($DB){print STDERR "\n|$stmtA|\n";} if (!$T)