Added code for 3-way-press-agent functions in agent screen, more to follow.
git-svn-id: svn://192.168.202.10@3777 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -69,6 +69,7 @@
|
||||
# 230421-0057 - Added vicidial_agent_latency_summary_log archiving
|
||||
# 230507-0804 - Added vicidial_latency_gaps archiving
|
||||
# 231028-0810 - Added --url-log-only and --url-log-days=x options for purging of vicidial_url_log table only
|
||||
# 231117-1914 - Added vicidial_3way_press_log archiving
|
||||
#
|
||||
|
||||
$CALC_TEST=0;
|
||||
@@ -3444,6 +3445,58 @@ if (!$T)
|
||||
}
|
||||
|
||||
|
||||
##### vicidial_3way_press_log
|
||||
$stmtA = "SELECT count(*) from vicidial_3way_press_log;";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
if ($sthArows > 0)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$vicidial_3way_press_log_count = $aryA[0];
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
$stmtA = "SELECT count(*) from vicidial_3way_press_log_archive;";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
if ($sthArows > 0)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$vicidial_3way_press_log_archive_count = $aryA[0];
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
if (!$Q) {print "\nProcessing vicidial_3way_press_log table... ($vicidial_3way_press_log_count|$vicidial_3way_press_log_archive_count)\n";}
|
||||
$stmtA = "INSERT IGNORE INTO vicidial_3way_press_log_archive SELECT * from vicidial_3way_press_log;";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
|
||||
$sthArows = $sthA->rows;
|
||||
if (!$Q) {print "$sthArows rows inserted into vicidial_3way_press_log_archive table \n";}
|
||||
|
||||
$rv = $sthA->err();
|
||||
if (!$rv)
|
||||
{
|
||||
if ($wipe_all > 0)
|
||||
{$stmtA = "DELETE FROM vicidial_3way_press_log;";}
|
||||
else
|
||||
{$stmtA = "DELETE FROM vicidial_3way_press_log WHERE call_date < '$del_time';";}
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows = $sthA->rows;
|
||||
if (!$Q) {print "$sthArows rows deleted from vicidial_3way_press_log table \n";}
|
||||
|
||||
$stmtA = "optimize table vicidial_3way_press_log;";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
|
||||
$stmtA = "optimize table vicidial_3way_press_log_archive;";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
}
|
||||
|
||||
|
||||
##### vicidial_call_notes
|
||||
$stmtA = "SELECT count(*) from vicidial_call_notes;";
|
||||
|
||||
Reference in New Issue
Block a user