IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 29942


Ignore:
Timestamp:
Dec 6, 2010, 9:49:09 AM (15 years ago)
Author:
rhenders
Message:

changing strat time from 6:35 to 6:30; now creating new metrics index page eaach morning

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/czarpoll.pl

    r29861 r29942  
    1414use czartool::Burntool;
    1515use czartool::DayMetrics;
    16 
     16use czartool::MetricsIndex;
    1717
    1818my $period = 60;
     
    126126
    127127        # sort out times
    128         $begin = strftime('%Y-%m-%d 06:35', localtime);
     128        $begin = strftime('%Y-%m-%d 06:30', localtime);
    129129        $end = $czarDb->getNowTimestamp();
    130130
     
    132132        if (!$doneMetricsToday && $czarDb->isBefore($begin, $end)) {
    133133       
    134                 print "* Creating metrics for last 24 hours\n";
    135                 my $yesterday = $czarDb->subtractInterval($today, "1 DAY");
    136                 # TODO hardcoded path needs to be in config
    137                 my $dayMetrics = new czartool::DayMetrics($gpc1Db, $czarDb, "/data/ipp004.0/ipp/ippMetrics/", 1, 0, $yesterday);
    138                 $dayMetrics->writeHTML();
    139                 $doneMetricsToday = 1;
     134            # create metrics for last 24 hours
     135            print "* Creating metrics for last 24 hours\n";
     136            my $yesterday = $czarDb->subtractInterval($today, "1 DAY");
     137            # TODO hardcoded path needs to be in config
     138            my $dayMetrics = new czartool::DayMetrics($gpc1Db,
     139                    $czarDb,
     140                    "/data/ipp004.0/ipp/ippMetrics/",
     141                    1, 0, $yesterday);
     142            $dayMetrics->writeHTML();
     143            $doneMetricsToday = 1;
     144
     145            # now update metrics index page
     146            my $metricsIndex = new czartool::MetricsIndex($gpc1Db,
     147                    $czarDb,
     148                    "/data/ipp004.0/ipp/ippMetrics/",
     149                    1, 0);
    140150        }
    141151
Note: See TracChangeset for help on using the changeset viewer.