Changeset 29292
- Timestamp:
- Oct 1, 2010, 9:08:32 AM (16 years ago)
- File:
-
- 1 edited
-
trunk/tools/czarpoll.pl (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/czarpoll.pl
r29252 r29292 105 105 my $newState = undef; 106 106 my $nsStatus = undef; 107 my $lastDay = strftime('%Y-%m-%d', localtime); 108 my $today = undef; 107 109 108 110 while (1) { 109 111 112 # check whether day has changed. if so, cleanup tables from previous day and optimize 113 $today = strftime('%Y-%m-%d', localtime); 114 if ($czarDb->isBefore($lastDay, $today)) { 115 116 print "* New day - performing cleanup\n"; 117 $czarDb->cleanupDateRange($lastDay, $lastDay, "30 MINUTE"); 118 $czarDb->optimize(); 119 $lastDay = $today; 120 } 121 110 122 # sort out times 111 $begin = strftime('%Y-%m-%d 06:35',localtime);123 $begin = strftime('%Y-%m-%d 06:35',localtime); 112 124 $end = $czarDb->getNowTimestamp(); 113 125
Note:
See TracChangeset
for help on using the changeset viewer.
