IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 30398


Ignore:
Timestamp:
Jan 27, 2011, 3:58:01 PM (15 years ago)
Author:
rhenders
Message:

now getting server dates for stdscience and registration and storing in a new czardb table

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/czarpoll.pl

    r30274 r30398  
    4646###########################################################################
    4747#
     48# Updates the dates from pantasks for all interested servers
     49#
     50###########################################################################
     51sub updateDates {
     52
     53    print "* Updating dates\n";
     54    my @servers = ("stdscience", "registration");
     55
     56    my $server = undef;
     57    $czarDb->emptyServerDates();
     58    foreach $server (@servers) {
     59
     60        my @dates = @{$pantasks->getDates($server)};
     61        if (@dates) {
     62
     63            $czarDb->updateServerDates($server, \@dates);
     64        }
     65        else {
     66
     67            print "WARNING: No dates to update for '$server'\n";
     68        }
     69    }
     70}
     71
     72###########################################################################
     73#
    4874# Updates the labels from pantasks for all interested servers
    4975#
     
    5985        my @labels = @{$pantasks->getLabels($server)};
    6086        if (@labels) {
    61        
     87
    6288            $czarDb->updateCurrentLabels($server, \@labels);
    6389        }
    6490        else {
    65        
    66              print "WARNING: No labels to update for '$server'\n";
     91
     92            print "WARNING: No labels to update for '$server'\n";
    6793        }
    6894    }
     
    129155        # if after 18:00 today, then perform some daily tasks and start plots from 18:00 today
    130156        else {
    131            
     157
    132158            $begin = "$today $newDayTime";
    133159
    134160            # check whether yesterday was cleaned. if not, cleanup tables and optimize
    135161            if ($lastDayDailyTasks ne $yesterday) {
    136    
     162
    137163                print "* performing daily tasks (clean-up, metrics)";
    138164
     
    164190        $plotter->plotDiskUsageHistogram();
    165191        updateServerStatus();
     192
     193        # check pantasks dates
     194        updateDates();
    166195
    167196        # check labels
Note: See TracChangeset for help on using the changeset viewer.