Ignore:
Timestamp:
12/18/16 23:46:07 (8 years ago)
Author:
Daniela Dorner
Message:
introduced usage of file for mysql pw to avoid warnings
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/DataCheck/QuickLook/SendData_Internal.sh

    r18672 r18694  
    8383   printprocesslog "DEBUG sendquery QUERY: "$query
    8484   echo "DEBUG sendquery QUERY: "$query
    85    mysql -s -u $us --password=$pw --host=$ho $db -e " $query "
     85   mysql $pwfile -s -u $us $pw --host=$ho $db -e " $query "
    8686   if [ "$table" == "AnalysisResultsRunLP" ]
    8787   then
    8888      query2=`echo $query | sed -e 's/AnalysisResultsRunLP/AnalysisResultsRunISDC/g'`
    8989      echo "# QUERY: "$query2
    90       mysql -s -u $us --password=$pw --host=$ho factdata_cp20150811 -e " $query2 "
    91    fi
     90      mysql $pwfile -s -u $us $pw --host=$ho factdata_cp20150811 -e " $query2 "
     91      fi
    9292}
    9393
     
    132132   mjd)  timeselect="Mjd(Min(fRunStart)) AS start, Mjd(MAX(fRunStop)) AS stop, "
    133133         timeselect2=" Mjd(MIN(o.start)) AS start, Mjd(MAX(o.stop)) AS stop, "
    134          break;;
     134         ;;
    135135   unix) timeselect="Unix_timestamp(CONVERT_TZ(Min(fRunStart), '+00:00', 'SYSTEM')) AS start, Unix_timestamp(CONVERT_TZ(Max(fRunStop), '+00:00', 'SYSTEM')) AS stop, "
    136136         timeselect2=" Unix_timestamp(CONVERT_TZ(MIN(o.start), '+00:00', 'SYSTEM')) AS start, Unix_timestamp(CONVERT_TZ(MAX(o.stop), '+00:00', 'SYSTEM')) AS stop, "
    137          break;;
     137         ;;
    138138   *)    timeselect="MIN(fRunStart) AS start, MAX(fRunStop) AS stop, "
    139139         timeselect2=" MIN(o.start) AS start, MAX(o.stop) as stop, "
    140          break;;
     140         ;;
    141141esac
    142142
     
    155155   query="SELECT "$timeselect" SUM(fNumExcEvts)/SUM("$ontimeif")*3600 AS excrate, "
    156156   query=$query" ExcErr(Sum(fNumSigEvts), SUM(fNumBgEvts))/SUM("$ontimeif")*3600 AS excerr, "
     157   query=$query" SUM("$ontimeif"/60.) AS ontime, "
    157158   query=$query" IF (SUM(fNumSigEvts)>10 AND SUM(fNumBgEvts)>10, LiMa(SUM(fNumSigEvts), SUM(fNumBgEvts)), IF (SUM(fNumSigEvts)-SUM(fNumBgEvts)>10, concat('(', LiMa(SUM(fNumSigEvts), SUM(fNumBgEvts)), ')'), '-')) AS significance, "
    158159   query=$query" LiMa(SUM(fNumSigEvts), SUM(fNumBgEvts)) AS significance2, "
     
    179180#echo $query
    180181
    181 printinfo | mail -s 'test internal downloading data ' -c dorner@astro.uni-wuerzburg.de -r dorner@astro.uni-wuerzburg.de $email
     182printinfo | mail -s 'test internal downloading data ' -b dorner@astro.uni-wuerzburg.de -r dorner@astro.uni-wuerzburg.de $email
    182183#printinfo
    183184
Note: See TracChangeset for help on using the changeset viewer.