IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 15, 2018, 11:11:37 AM (8 years ago)
Author:
eugene
Message:

test for ipp_filename failure modes and report a meaningful error; remove PSCONFIG, PSCONFDIR (not not used in ippMonitor); NEB_SERVER supplied from config.dat

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippMonitor/raw/ipp.php

    r40426 r40433  
    826826    // these are defined by site.php
    827827    global $PERLLIB;
     828    global $NEB_SERVER;
    828829    global $BINDIR;
    829830    global $SITE;
    830     global $PSCONFDIR;
    831     global $PSCONFIG;
    832 
    833     putenv("PSCONFDIR=$PSCONFDIR");
    834     putenv("PSCONFIG=$PSCONFIG");
    835831    putenv("PERL5LIB=$PERLLIB:");
     832
    836833    $PATH = getenv("PATH");
    837834    putenv("PATH=$BINDIR:$PATH");
    838     putenv("NEB_SERVER=http://ippc74/nebulous");
    839 
    840     // be careful of the definition of PATH in SITE: cannot contain HOME
    841     // echo "<br>ipp_filename.pl --site=$SITE --basename $basename --filerule $filerule --camera $camera --class_id $class_id<br>\n";
     835    putenv("NEB_SERVER=$NEB_SERVER");
     836
    842837    exec ("ipp_filename.pl --site=$SITE --basename $basename --filerule $filerule --camera $camera --class_id $class_id", $output, $status);
    843838
    844839    if (0) {
    845       echo "PSCONFDIR: $PSCONFDIR<br>";
    846       echo "PSCONFIG: $PSCONFIG<br>";
    847840      echo "PERLLIB: $PERLLIB<br>";
     841      echo "NEB_SERVER: $NEB_SERVER<br>";
    848842      echo "basename: $basename<br>";
    849843      for ($i = 0; $i < count($output); $i++) {
     
    859853    $filename = $output[0];
    860854    if ($status) {
    861       echo "log file ($filerule, $basename) not found<br>\n";
    862       return;
     855      if ($status == 1) {       
     856        echo "<b>log file ($filerule, $basename) not found<br></b>\n";
     857        echo "ipp_filename.pl --site=$SITE --basename $basename --filerule $filerule --camera $camera --class_id $class_id<br>";
     858        return;
     859      } else {
     860        echo "<b>ipp_filename.pl failure, check configuration<br></b>\n";
     861        echo "ipp_filename.pl --site=$SITE --basename $basename --filerule $filerule --camera $camera --class_id $class_id<br>";
     862        echo "NEB_SERVER: $NEB_SERVER<br>";
     863        return;
     864      }
    863865    }
    864866    echo "<b>log filename: $filename</b><br>\n";
Note: See TracChangeset for help on using the changeset viewer.