IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 41302 for trunk/ippMonitor


Ignore:
Timestamp:
Mar 2, 2020, 2:04:01 PM (6 years ago)
Author:
tdeboer
Message:

Adding czarpoll backup flag and related behaviour

Location:
trunk/ippMonitor/czartool
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippMonitor/czartool/czarconfig.xml.in

    r40840 r41302  
    1717    <savelocation>PATH/TO/ippMetrics</savelocation>
    1818    <starttime>18:00</starttime>
     19    <backupversion>0</backupversion>
    1920  </metrics>
    2021
  • trunk/ippMonitor/czartool/czarpoll.pl

    r41126 r41302  
    292292    my $yesterday = undef;
    293293    my $newDayTime = $config->getMetricsStartTime();
     294    my $metricsbackupversion = $config->getMetricsBackupVersion();
    294295    my $lastDayDailyTasks = "2010-01-01";
    295296    my $checkneb = 1; # 1 for nebulous, 0 for localhost test
     
    346347
    347348                # now cleanup tables from yesterday and optimize
    348                 #TdB20190703: The ipp113 and ipp117 instances of czarpoll use the same stage DBs in czarDB.
    349                 #Therefore, it makes no sense to run the cleanup+optimising twice
     349                # TdB20190703: The ipp113 and ipp117 instances of czarpoll use the same stage DBs in czarDB.
     350                # Therefore, ensure DB optimising happens only in the regular version.
    350351                print "* Performing database cleanup\n";
    351352                $czarDb->cleanupDateRange($yesterday, $yesterday, $config->getCzarCleanupInterval());
    352                 #print "* Optimizing the database\n";
    353                 #$czarDb->optimize();
     353                if($metricsbackupversion == 0) {
     354                    print "* Optimizing the database\n";
     355                    $czarDb->optimize();
     356                }
    354357                $lastDayDailyTasks = $yesterday;
    355358            }
  • trunk/ippMonitor/czartool/czartool/Config.pm

    r40090 r41302  
    5151    $self->{metricssavelocation} = $xc->findvalue('//metrics/savelocation');
    5252    $self->{metricsstarttime} = $xc->findvalue('//metrics/starttime');
     53    $self->{metricsbackupversion} = $xc->findvalue('//metrics/backupversion');
    5354
    5455    # gpc1 db
     
    247248###########################################################################
    248249#
     250# Returns flag setting backup version of czartool
     251#
     252###########################################################################
     253sub getMetricsBackupVersion {
     254    my ($self) = @_;
     255    return $self->{metricsbackupversion};
     256}
     257
     258###########################################################################
     259#
    249260# Returns name for gpc1 Db
    250261#
Note: See TracChangeset for help on using the changeset viewer.