IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 17, 2023, 4:41:34 PM (3 years ago)
Author:
eugene
Message:

merging from trunk

Location:
branches/eam_branches/ipp-20230313/tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20230313/tools

  • branches/eam_branches/ipp-20230313/tools/eam/rawfix.20230221/src/check.rawfix.sh

    r42406 r42531  
    1414
    1515# make the rawfix database to track rawfix operations
    16 set DBHOST = "ipp060"
     16set DBHOST = "ippc190"
    1717set DBNAME = "rawfix"
    18 set DBUSER = "dvo"
    19 set DBPASS = "dvo"
     18# set DBUSER = "dvo"
     19# set DBPASS = "dvo"
    2020
    2121# set DBOPTS = "-B --skip-column-names -h $DBHOST -u $DBUSER -p$DBPASS $DBNAME"
    22 set DBOPTS = "-B -h $DBHOST -u $DBUSER -p$DBPASS $DBNAME"
     22set DBOPTS = "--defaults-extra-file=~/.my.cnf.rawfix -B -h $DBHOST $DBNAME"
    2323
    2424if ($mode == "all") then
     
    2828  endif
    2929
    30   mysql $DBOPTS -e "select dateobs, state from nights"
     30  mysql $DBOPTS -e "select dateobs, iter, state from nights"
    3131  exit 0
    3232endif
     
    4949
    5050  set mynight = $2
    51   mysql $DBOPTS -e "select dateobs, state from nights where (dateobs = '$mynight')"
     51  mysql $DBOPTS -E -e "select * from nights where (dateobs = '$mynight')"
    5252  exit 0
    5353endif
     
    6161  set mystate = $2
    6262
    63   if ($mystate == "new") goto good_state
    64   if ($mystate == "rsync") goto good_state
    65   if ($mystate == "md5sum.new") goto good_state
    66   if ($mystate == "md5sum.done") goto good_state
    67   if ($mystate == "md5sum.fail") goto good_state
    68   if ($mystate == "ckchip.new") goto good_state
    69   if ($mystate == "ckchip.done") goto good_state
    70   if ($mystate == "ckchip.fail") goto good_state
    71   if ($mystate == "fixchip.new") goto good_state
    72   if ($mystate == "fixchip.done") goto good_state
    73   if ($mystate == "fixchip.fail") goto good_state
     63  if ($mystate == "ckchip.new")      goto good_state
     64  if ($mystate == "ckchip.done")     goto good_state
     65  if ($mystate == "ckchip.fail")     goto good_state
     66  if ($mystate == "fixchip.new")     goto good_state
     67  if ($mystate == "fixchip.done")    goto good_state
     68  if ($mystate == "fixchip.fail")    goto good_state
     69  if ($mystate == "md5sum.new")      goto good_state
     70  if ($mystate == "md5sum.done")     goto good_state
     71  if ($mystate == "md5sum.fail")     goto good_state
     72  if ($mystate == "md5chk.new")      goto good_state
     73  if ($mystate == "md5chk.done")     goto good_state
     74  if ($mystate == "md5chk.fail")     goto good_state
     75  if ($mystate == "burntool.new")    goto good_state
     76  if ($mystate == "burntool.done")   goto good_state
     77  if ($mystate == "burntool.fail")   goto good_state
    7478
    7579  echo "ERROR: unknown mode $mystate"
     
    7781
    7882  good_state:
    79   mysql $DBOPTS -e "select dateobs from nights where (state = '$mystate')"
     83  set t = `date +%T..%N`
     84  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}'
    8085  exit 0
    8186endif
Note: See TracChangeset for help on using the changeset viewer.