Added additional logging for Timeclock end-of-day processes
Ssmall changes for Inbound Queue No Dial git-svn-id: svn://192.168.202.10@2932 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -127,9 +127,10 @@
|
||||
# 171010-2254 - Added process debug with --DebugXXX flag and screen logging
|
||||
# 171221-1628 - Added rolling of vicidial_ingroup_hour_counts records
|
||||
# 180204-0931 - Added rolling of vicidial_inbound_callback_queue records
|
||||
# 180301-1257 - Added more teodDB logging
|
||||
#
|
||||
|
||||
$build = '180204-0931';
|
||||
$build = '180301-1257';
|
||||
|
||||
$DB=0; # Debug flag
|
||||
$teodDB=0; # flag to log Timeclock End of Day processes to log file
|
||||
@@ -921,7 +922,7 @@ if ($timeclock_auto_logout > 0)
|
||||
`/usr/bin/screen -d -m -S Timeclock $PATHhome/ADMIN_timeclock_auto_logout.pl 2>/dev/null 1>&2`;
|
||||
if ($teodDB)
|
||||
{
|
||||
$event_string = "running Timeclock auto-logout process|/usr/bin/screen -d -m -S Timeclock $PATHhome/ADMIN_timeclock_auto_logout.pl 2>/dev/null 1>&2";
|
||||
$event_string = "running Timeclock auto-logout process $build|/usr/bin/screen -d -m -S Timeclock $PATHhome/ADMIN_timeclock_auto_logout.pl 2>/dev/null 1>&2";
|
||||
&teod_logger;
|
||||
}
|
||||
}
|
||||
@@ -955,7 +956,7 @@ $sthA->finish();
|
||||
|
||||
if ($timeclock_end_of_day_NOW > 0)
|
||||
{
|
||||
if ($teodDB) {$event_string = "Starting timeclock end of day processes: $stmtA|$timeclock_end_of_day_NOW"; &teod_logger;}
|
||||
if ($teodDB) {$event_string = "Starting timeclock end of day processes: $stmtA|$timeclock_end_of_day_NOW|$build"; &teod_logger;}
|
||||
|
||||
$stmtA = "SELECT agents_calls_reset,usacan_phone_dialcode_fix from system_settings;";
|
||||
if ($DB) {print "|$stmtA|\n";}
|
||||
@@ -1308,10 +1309,11 @@ if ($timeclock_end_of_day_NOW > 0)
|
||||
$stmtA = "INSERT IGNORE INTO vicidial_campaign_hour_counts_archive SELECT * from vicidial_campaign_hour_counts where date_hour < '$today_start';";
|
||||
$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_campaign_hour_counts_archive table \n";}
|
||||
|
||||
$event_string = "$sthArows rows inserted into vicidial_campaign_hour_counts_archive table";
|
||||
if (!$Q) {print "$event_string \n";}
|
||||
if ($teodDB) {&teod_logger;}
|
||||
|
||||
$rv = $sthA->err();
|
||||
if (!$rv)
|
||||
{
|
||||
@@ -1319,7 +1321,9 @@ if ($timeclock_end_of_day_NOW > 0)
|
||||
$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_campaign_hour_counts table \n";}
|
||||
$event_string = "$sthArows rows deleted from vicidial_campaign_hour_counts table";
|
||||
if (!$Q) {print "$event_string \n";}
|
||||
if ($teodDB) {&teod_logger;}
|
||||
|
||||
$stmtA = "optimize table vicidial_campaign_hour_counts;";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
@@ -1331,10 +1335,11 @@ if ($timeclock_end_of_day_NOW > 0)
|
||||
$stmtA = "INSERT IGNORE INTO vicidial_carrier_hour_counts_archive SELECT * from vicidial_carrier_hour_counts where date_hour < '$today_start';";
|
||||
$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_carrier_hour_counts_archive table \n";}
|
||||
|
||||
$event_string = "$sthArows rows inserted into vicidial_carrier_hour_counts_archive table";
|
||||
if (!$Q) {print "$event_string \n";}
|
||||
if ($teodDB) {&teod_logger;}
|
||||
|
||||
$rv = $sthA->err();
|
||||
if (!$rv)
|
||||
{
|
||||
@@ -1342,7 +1347,9 @@ if ($timeclock_end_of_day_NOW > 0)
|
||||
$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_carrier_hour_counts table \n";}
|
||||
$event_string = "$sthArows rows deleted from vicidial_carrier_hour_counts table";
|
||||
if (!$Q) {print "$event_string \n";}
|
||||
if ($teodDB) {&teod_logger;}
|
||||
|
||||
$stmtA = "optimize table vicidial_carrier_hour_counts;";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
@@ -1354,10 +1361,11 @@ if ($timeclock_end_of_day_NOW > 0)
|
||||
$stmtA = "INSERT IGNORE INTO vicidial_ingroup_hour_counts_archive SELECT * from vicidial_ingroup_hour_counts where date_hour < '$today_start';";
|
||||
$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_ingroup_hour_counts_archive table \n";}
|
||||
|
||||
$event_string = "$sthArows rows inserted into vicidial_ingroup_hour_counts_archive table";
|
||||
if (!$Q) {print "$event_string \n";}
|
||||
if ($teodDB) {&teod_logger;}
|
||||
|
||||
$rv = $sthA->err();
|
||||
if (!$rv)
|
||||
{
|
||||
@@ -1365,7 +1373,9 @@ if ($timeclock_end_of_day_NOW > 0)
|
||||
$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_ingroup_hour_counts table \n";}
|
||||
$event_string = "$sthArows rows deleted from vicidial_ingroup_hour_counts table";
|
||||
if (!$Q) {print "$event_string \n";}
|
||||
if ($teodDB) {&teod_logger;}
|
||||
|
||||
$stmtA = "optimize table vicidial_ingroup_hour_counts;";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
@@ -1377,10 +1387,11 @@ if ($timeclock_end_of_day_NOW > 0)
|
||||
$stmtA = "INSERT IGNORE INTO vicidial_inbound_callback_queue_archive SELECT * from vicidial_inbound_callback_queue where icbq_status IN('SENT','EXPIRED','DNCL','DNCC','ORPHAN');";
|
||||
$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_inbound_callback_queue_archive table \n";}
|
||||
|
||||
$event_string = "$sthArows rows inserted into vicidial_inbound_callback_queue_archive table";
|
||||
if (!$Q) {print "$event_string \n";}
|
||||
if ($teodDB) {&teod_logger;}
|
||||
|
||||
$rv = $sthA->err();
|
||||
if (!$rv)
|
||||
{
|
||||
@@ -1388,7 +1399,9 @@ if ($timeclock_end_of_day_NOW > 0)
|
||||
$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_inbound_callback_queue table \n";}
|
||||
$event_string = "$sthArows rows deleted from vicidial_inbound_callback_queue table";
|
||||
if (!$Q) {print "$event_string \n";}
|
||||
if ($teodDB) {&teod_logger;}
|
||||
|
||||
$stmtA = "optimize table vicidial_inbound_callback_queue;";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
@@ -1401,6 +1414,7 @@ if ($timeclock_end_of_day_NOW > 0)
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows = $sthA->rows;
|
||||
if (!$Q) {print "$sthArows vicidial_inbound_groups rows closing_time_now_trigger value reset \n";}
|
||||
if ($teodDB) {$event_string = "$sthArows vicidial_inbound_groups rows closing_time_now_trigger value reset"; &teod_logger;}
|
||||
|
||||
##### BEGIN max stats end of day process #####
|
||||
# set OPEN max stats records to CLOSING for processing
|
||||
|
||||
Reference in New Issue
Block a user