Added force_fronter_leave_3way Agent API function

git-svn-id: svn://192.168.202.10@3026 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2018-09-09 13:28:03 +00:00
parent ea5c29567b
commit c35a32b1c1
9 changed files with 300 additions and 11 deletions
+30 -1
View File
@@ -130,9 +130,10 @@
# 180301-1257 - Added more teodDB logging
# 180512-2214 - Added reset of hopper_calls_today
# 180818-2229 - Added rolling of vicidial_recent_ascb_calls records
# 180908-1428 - Added daily rolling of vicidial_ccc_log records
#
$build = '180818-2229';
$build = '180908-1428';
$DB=0; # Debug flag
$teodDB=0; # flag to log Timeclock End of Day processes to log file
@@ -1436,6 +1437,34 @@ if ($timeclock_end_of_day_NOW > 0)
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
}
# roll of vicidial_ccc_log records, keep only 1 day of records in active table
if (!$Q) {print "\nProcessing vicidial_ccc_log table...\n";}
$stmtA = "INSERT IGNORE INTO vicidial_ccc_log_archive SELECT * from vicidial_ccc_log;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows = $sthA->rows;
$event_string = "$sthArows rows inserted into vicidial_ccc_log_archive table";
if (!$Q) {print "$event_string \n";}
if ($teodDB) {&teod_logger;}
$rv = $sthA->err();
if (!$rv)
{
$stmtA = "DELETE FROM vicidial_ccc_log WHERE call_date < \"$RMSQLdate\";";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows = $sthA->rows;
$event_string = "$sthArows rows deleted from vicidial_ccc_log table";
if (!$Q) {print "$event_string \n";}
if ($teodDB) {&teod_logger;}
$stmtA = "optimize table vicidial_ccc_log;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
}
# reset in-group closing_time_now_trigger trigger flag
$stmtA = "UPDATE vicidial_inbound_groups SET closing_time_now_trigger='N' WHERE closing_time_now_trigger='Y';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;