IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 7, 2023, 4:50:38 PM (3 years ago)
Author:
eugene
Message:

rework to use a stage/iteration tracked by the rawfix database

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/eam/rawfix.20230221/src/check.rawfix.sh

    r42430 r42445  
    4949
    5050  set mynight = $2
    51   mysql $DBOPTS -e "select dateobs, state from nights where (dateobs = '$mynight')"
     51  mysql $DBOPTS -e "select * from nights where (dateobs = '$mynight')"
    5252  exit 0
    5353endif
     
    7474  if ($mystate == "md5chk.fail")   goto good_state
    7575
    76   # stage 2:
    77   if ($mystate == "fixchip_s2.new")   goto good_state
    78   if ($mystate == "fixchip_s2.done")  goto good_state
    79   if ($mystate == "fixchip_s2.fail")  goto good_state
    80   if ($mystate == "md5sum_s2.new")    goto good_state
    81   if ($mystate == "md5sum_s2.done")   goto good_state
    82   if ($mystate == "md5sum_s2.fail")   goto good_state
    83   if ($mystate == "md5chk_s2.new")    goto good_state
    84   if ($mystate == "md5chk_s2.done")   goto good_state
    85   if ($mystate == "md5chk_s2.fail")   goto good_state
    86 
    87   # stage 3:
    88   if ($mystate == "fixchip_s3.new")   goto good_state
    89   if ($mystate == "fixchip_s3.done")  goto good_state
    90   if ($mystate == "fixchip_s3.fail")  goto good_state
    91   if ($mystate == "ckchip_s3.new")    goto good_state
    92   if ($mystate == "ckchip_s3.done")   goto good_state
    93   if ($mystate == "ckchip_s3.fail")   goto good_state
    94 
    95 # disable the rsyncs stages: run in directory from b-node
    96 #  if ($mystate == "rsync_s1.new")  goto good_state
    97 #  if ($mystate == "rsync_s1.done") goto good_state
    98 #  if ($mystate == "rsync_s1.fail") goto good_state
    99 #  if ($mystate == "rsync_s2.new")  goto good_state
    100 #  if ($mystate == "rsync_s2.done") goto good_state
    101 #  if ($mystate == "rsync_s2.fail") goto good_state
    102 
    10376  echo "ERROR: unknown mode $mystate"
    10477  exit 2
     
    10679  good_state:
    10780  set t = `date +%T..%N`
    108   mysql $DBOPTS -e "select dateobs, curtime() as timestamp from nights where (state = '$mystate')" | awk -v T=$t '(NR == 1){print $0}(NR > 1){print $1, T}'
     81  mysql $DBOPTS -e "select dateobs, iter from nights where (state = '$mystate')" | awk -v T=$t '(NR == 1){print $0, "timestamp"}(NR > 1){print $1, $2, T}'
    10982  exit 0
    11083endif
Note: See TracChangeset for help on using the changeset viewer.