IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 31, 2011, 2:51:48 PM (15 years ago)
Author:
eugene
Message:

merging changes from trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20101205/tools/roboczar.pl

    r29804 r30446  
    77
    88# local classes
     9use czartool::Config;
    910use czartool::CzarDb;
    1011use czartool::Gpc1Db;
     
    1516use czartool::StageMetrics;
    1617
    17 my $czarDbName = "czardb"; # TODO variables for other Db stuff, host etc
    1818my $save_temps = 0;
    1919
    20 GetOptions (
    21         "dbname|d=s" => \$czarDbName,
    22         );
    23 
    24 my $czarDb = new czartool::CzarDb($czarDbName, "ippdb01", "ipp", "ipp", 0, $save_temps); # TODO last arg here is save_temps, should get as arg
    25 
    26 $czarDb->setDateFormat("%Y%m%d-%H%i%s");
     20my $config = new czartool::Config();
     21my $czarDb = $config->getCzarDbInstance();
    2722
    2823my @stages = ("burntool", "chip", "cam", "fake", "warp", "stack", "diff", "magic", "magicDS", "dist"); # TODO get from Pantasks
     
    4136    $message = "";
    4237
    43     if (anyStoppedServers("20 MINUTE", \$serversMessage)) {
     38    if (anyStoppedServers($config->getRoboczarServerInterval(), \$serversMessage)) {
    4439
    4540        $message .= "\n\n" . $serversMessage;
    4641        $anythingToReport = 1;
    4742    }
    48     if (anyStuckStages("2 HOUR", \$stuckMessage)) {
     43#    if (anyStuckStages("2 HOUR", \$stuckMessage)) {
    4944
    50         $message .= "\n\n" . $stuckMessage;
    51         $anythingToReport = 1;
    52     }
     45 #       $message .= "\n\n" . $stuckMessage;
     46  #      $anythingToReport = 1;
     47   # }
    5348
    5449    if ($anythingToReport && $message ne $lastMessage) {
     
    5651print "\n\n$message\n\n";
    5752
    58         sendEmail(
    59                 "ps-ipp-ops\@ifa.hawaii.edu",
     53        sendEmail($config->getRoboczarEmail(),
    6054                "Roboczar warnings",
    6155                "$message\n");
     
    8276    my $anyStuckStages = 0;
    8377
    84     # exception - we don't care if burntool is stalled before 6:30am
     78    # exception - we don't care if burntool is stalled before 6:30am TODO we do now
    8579    my $burntime = strftime('%Y-%m-%d 06:35', localtime);
    8680    my $worryAboutBurntool = $czarDb->isBefore($burntime, $end);
Note: See TracChangeset for help on using the changeset viewer.