From 113bad5945fdf23baf834b20ad77da46e67be3d2 Mon Sep 17 00:00:00 2001 From: mattf Date: Wed, 31 Jul 2024 12:21:41 +0000 Subject: [PATCH] Fix for 2nd DB connection timing out while running AST_VDauto_dial.pl script git-svn-id: svn://192.168.202.10@3859 3d104415-ff17-0410-8863-d5cf3c621b8a --- agc_2-X/trunk/bin/AST_VDauto_dial.pl | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/agc_2-X/trunk/bin/AST_VDauto_dial.pl b/agc_2-X/trunk/bin/AST_VDauto_dial.pl index 0280aebc..c644c300 100644 --- a/agc_2-X/trunk/bin/AST_VDauto_dial.pl +++ b/agc_2-X/trunk/bin/AST_VDauto_dial.pl @@ -159,9 +159,10 @@ # 231129-0901 - Added vicidial_phone_number_call_daily_counts updates/inserts # 240219-1524 - Added daily_limit in-group parameter # 240225-0951 - Added AUTONEXT hopper_hold_inserts option +# 240731-0814 - Fix for 2nd DB connection timing out while running # -$build='240225-0951'; +$build='240731-0814'; $script='AST_VDauto_dial'; ### begin parsing run-time options ### if (length($ARGV[0])>1) @@ -518,17 +519,17 @@ while($one_day_interval > 0) $shared_dial_camp_override=0; ##### Get maximum calls per second that this process can send out - $stmtA = "SELECT outbound_calls_per_second,vicidial_recording_limit FROM servers where server_ip='$server_ip';"; - $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; - $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; - $sthArows=$sthA->rows; - if ($sthArows > 0) + $stmtC = "SELECT outbound_calls_per_second,vicidial_recording_limit FROM servers where server_ip='$server_ip';"; + $sthC = $dbhC->prepare($stmtC) or die "preparing: ",$dbhC->errstr; + $sthC->execute or die "executing: $stmtC ", $dbhC->errstr; + $sthCrows=$sthC->rows; + if ($sthCrows > 0) { - @aryA = $sthA->fetchrow_array; - $outbound_calls_per_second = $aryA[0]; - $DBvicidial_recording_limit = $aryA[1]; + @aryC = $sthC->fetchrow_array; + $outbound_calls_per_second = $aryC[0]; + $DBvicidial_recording_limit = $aryC[1]; } - $sthA->finish(); + $sthC->finish(); if ( ($outbound_calls_per_second > 0) && ($outbound_calls_per_second < 201) ) {$per_call_delay = (1000 / $outbound_calls_per_second);}