IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 29374


Ignore:
Timestamp:
Oct 11, 2010, 3:11:38 PM (16 years ago)
Author:
rhenders
Message:

removed redundant method

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/roboczar.pl

    r29279 r29374  
    6363###########################################################################
    6464#
    65 #  Checks the status of a given label
    66 #
    67 ###########################################################################
    68 sub checkLabel {
    69     my ($label, $interval) = @_;
    70 
    71     my $faultsNow;
    72     my $faultsInPast;
    73     my $newFaults;
    74     my $pendingNow;
    75     my $processedRecently;
    76     my $stage = undef;
    77 
    78     print "* Checking all stages for label $label\n";
    79 
    80     foreach $stage (@stages) {
    81 
    82         # check for increasing faults
    83         $faultsNow = $czarDb->countFaultsInPast($label, $stage, "0 MINUTE");
    84         $faultsInPast = $czarDb->countFaultsInPast($label, $stage, $interval);
    85         if ($faultsNow > $faultsInPast) {
    86             $newFaults = $faultsNow - $faultsInPast;
    87             print "There have been $newFaults new faults in the last $interval (label='$label', stage='$stage')\n";
    88         }
    89 
    90         # check for lack of processing
    91         $pendingNow =  $czarDb->countPendingNow($label, $stage);
    92         $processedRecently = $czarDb->countProcessed($label, $stage, $interval);
    93         if ($pendingNow > 0 && $processedRecently < 1) {
    94 
    95             print "Only $processedRecently exposures have processed out of $pendingNow($faultsNow) pending in the last $interval (label='$label', stage='$stage')\n";
    96 
    97         }
    98     }
    99     #sendEmail("roydhenderson\@gmail.com", "roboczar\@ipp.com", "Roboczar update", "Some content");
    100 }
    101 
    102 ###########################################################################
    103 #
    10465# Sends an email
    10566#
Note: See TracChangeset for help on using the changeset viewer.