Changeset 29374
- Timestamp:
- Oct 11, 2010, 3:11:38 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/tools/roboczar.pl (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/roboczar.pl
r29279 r29374 63 63 ########################################################################### 64 64 # 65 # Checks the status of a given label66 #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 faults83 $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 processing91 $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 #104 65 # Sends an email 105 66 #
Note:
See TracChangeset
for help on using the changeset viewer.
