Changeset 32761 for trunk/ippMonitor
- Timestamp:
- Nov 22, 2011, 12:41:22 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/ippMonitor/czartool/czartool/CzarDb.pm (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippMonitor/czartool/czartool/CzarDb.pm
r32735 r32761 8 8 use File::Temp; 9 9 10 my @stages = ("burntool", "chip", "cam", "fake", "warp", "stack", "diff", "magic", "magicDS", "dist", "pub"); # TODO put elsewhere 10 my @stages = ( 11 "burntool", 12 "chip", 13 "cam", 14 "fake", 15 "warp", 16 "stack", 17 "diff", 18 "magic", 19 "magicDS", 20 "dist", 21 "pub"); # TODO put elsewhere 22 23 my @ippToPspsStages = ( 24 "processed", 25 "loaded_to_datastore", 26 "loaded_to_ODM", 27 "merge_worthy", 28 "deleted_datastore", 29 "deleted_dxlayer", 30 "merged", 31 "deleted_local"); 32 33 my @allStages = (@stages, @ippToPspsStages); 11 34 12 35 use base 'czartool::MySQLDb'; … … 33 56 ########################################################################### 34 57 # 35 # Gets current_labels table 58 # Gets current ippToPsps labels 59 # 60 ########################################################################### 61 sub getCurrentIppToPspsLabels { 62 my ($self, $begin, $end, $labels) = @_; 63 64 my $query = $self->{_db}->prepare(<<SQL); 65 66 SELECT DISTINCT label 67 FROM processed 68 WHERE timestamp >= '$begin' 69 AND timestamp <= '$end' 70 SQL 71 72 if (!$query->execute) {return 0;} 73 74 ${$labels} = $query->fetchall_arrayref(); 75 76 return 1; 77 } 78 79 ########################################################################### 80 # 81 # Gets current labels from the current_labels table 36 82 # 37 83 ########################################################################### … … 1107 1153 my $stage = undef; 1108 1154 $totalDeleted = 0; 1109 foreach $stage (@ stages) {1155 foreach $stage (@allStages) { 1110 1156 1111 1157 if (!$self->getLabelsInThisTimePeriod($stage, $fromTime, $toTime, \$labels)) {next;} … … 1213 1259 1214 1260 my $stage = undef; 1215 foreach $stage (@ stages) {1261 foreach $stage (@allStages) { 1216 1262 1217 1263 $self->optimizeTable($stage);
Note:
See TracChangeset
for help on using the changeset viewer.
