Ignore:
Timestamp:
09/01/21 07:56:42 (3 years ago)
Author:
maslowski
Message:
Added better error handeling and tracking in the databas.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/hawc/processing/DiskToDB/run-star2.sh

    r20093 r20103  
    3232readonly STAR=star
    3333# Directory to Mars environment (usually Mars/build)
    34 readonly MARS="/home/frankm/Dateien/Mars/build/"
     34readonly MARS="/home/frankm/Dateien/Mars-6.24.00/build4/"
    3535# Absolut path to macros
    36 readonly MACROS="/home/frankm/Dateien/Mars/hawc"
     36readonly MACROS="/home/frankm/Dateien/Mars-6.24.00/hawc"
    3737readonly PROGRAM=$0
    3838REPLACE=false
     
    8787DATA="${3}"
    8888NIGHT="${4}"
     89
     90function UpdateStatus()
     91{
     92        local tel="${1}"
     93        local night="${2}"
     94        local runid="${3}"
     95        local stat="${4}"
     96
     97        mysql --defaults-file=${CRED} \
     98                --compress \
     99                -e "UPDATE DataOnDisk \
     100                SET DataOnDisk.star = ${stat} \
     101                WHERE DataOnDisk.Telescope = ${tel} \
     102                AND DataOnDisk.NIGHT = ${night} \
     103                AND DataOnDisk.RUNID = ${runid};"
     104}
    89105
    90106# Get all runs that can (and should) be calibrated
     
    166182                        then
    167183                                touch "${OUT}"/.${PREFIX}.success
     184                        else
     185                                UpdateStatus ${TEL} ${NIGHT} ${DATRUNID} 1
    168186                        fi
    169187
Note: See TracChangeset for help on using the changeset viewer.