IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 2, 2013, 11:51:29 AM (13 years ago)
Author:
bills
Message:

don't bail if pantasks is still running show the status
available in the DB

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pstamp/scripts/pstamp_server_status

    r33016 r35486  
    6565
    6666
     67    my $serverRunning = 0;
    6768    my $command = "$pantasks_client < $pantasks_script";
    6869    my  ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    6970        run(command => $command, verbose => $verbose);
    70     unless ($success) {
     71    if ($success) {
     72        $serverRunning = 1;
     73    } else {
    7174        $error_code = (($error_code >> 8) or 1);
    72         if ($error_code == 12) {
    73             print "Postage Stamp Server is not running\n";
     75        if ($error_code == 12 || $error_code == 13) {
     76            print "Postage Stamp Server is not running\n<br>";
    7477            #print "Postage Stamp Server will be down for maintenance it will back shortly.\n";
    75             exit 0;
     78#            exit 0;
    7679        } else {
    77             warn("$command failed. exit status: $error_code");
    78             exit $error_code;
     80            warn("\nError: $command failed. exit status: $error_code\n");
     81#            exit $error_code;
    7982        }
    8083    }
     
    119122        } else {
    120123            print STDERR "Controller state not found";
    121             exit 1;
     124#            exit 1;
    122125        }
    123126        print "$br$br\n";
    124     } else {
     127    } elsif ($serverRunning) {
    125128        print STDERR "Scheduler state not found";
    126         exit 1;
     129#        exit 1;
    127130    }
    128131
     
    148151            print "Task pstamp.job.run not found.<br />\n";
    149152        }
    150     } else {
    151         print "Task pstamp.request.run not found.\n";
     153    } elsif ($serverRunning) {
     154        print "Task pstamp.request.run not found.<br >\n";
    152155    }
    153156}
Note: See TracChangeset for help on using the changeset viewer.