IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 32761 for trunk/ippMonitor


Ignore:
Timestamp:
Nov 22, 2011, 12:41:22 PM (15 years ago)
Author:
rhenders
Message:

changes to incorporate ippToPsps stages

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippMonitor/czartool/czartool/CzarDb.pm

    r32735 r32761  
    88use File::Temp;
    99
    10 my @stages = ("burntool", "chip", "cam", "fake", "warp", "stack", "diff", "magic", "magicDS", "dist", "pub"); # TODO put elsewhere
     10my @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
     23my @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
     33my @allStages = (@stages, @ippToPspsStages);
    1134
    1235use base 'czartool::MySQLDb';
     
    3356###########################################################################
    3457#
    35 # Gets current_labels table
     58# Gets current ippToPsps labels
     59#
     60###########################################################################
     61sub 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'
     70SQL
     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
    3682#
    3783###########################################################################
     
    11071153        my $stage = undef;
    11081154        $totalDeleted = 0;
    1109         foreach $stage (@stages) {
     1155        foreach $stage (@allStages) {
    11101156
    11111157            if (!$self->getLabelsInThisTimePeriod($stage, $fromTime, $toTime, \$labels)) {next;}
     
    12131259
    12141260    my $stage = undef;
    1215     foreach $stage (@stages) {
     1261    foreach $stage (@allStages) {
    12161262
    12171263        $self->optimizeTable($stage);
Note: See TracChangeset for help on using the changeset viewer.