Ignore:
Timestamp:
03/01/14 23:56:07 (11 years ago)
Author:
Daniela Dorner
Message:
added rsync of drs-file to avoid failing callistos
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/DataCheck/Transfer/RsyncRawToISDC.sh

    r17149 r17574  
    2525   runid=${primaries[$s+$s+1]}
    2626   nightpath=`echo $night | cut -c 1-4`"/"`echo $night | cut -c 5-6`"/"`echo $night | cut -c 7-8`
    27    
     27   lppath="/loc_data/zipraw/"$nightpath
     28   nightrun=$night"_"`printf %03d $runid`
     29   lpfile=`ssh fact@161.72.93.131 "find $lppath -type f -regex '.*$nightrun[.]fits[.][fg]z'"`
     30   if [ "$lpfile" == "" ]
     31   then
     32      #echo $nightrun" not yet available on data."
     33      printprocesslog "INFO "$nightrun" not yet available on data."
     34      continue
     35   else
     36      filename=`basename $lpfile`
     37   fi
     38
    2839   setstatus "start"
    2940
    30    rawfilelp="/loc_data/zipraw/./"$nightpath"/"$night"_"`printf %03d $runid`".fits.gz"
     41   rawfilelp="/loc_data/zipraw/./"$nightpath"/"$filename
    3142   rawdirisdc="/scratch/from_lapalma/raw/"
    32    rawfileisdc=$rawdirisdc$nightpath"/"$night"_"`printf %03d $runid`".fits.gz"
     43   rawfileisdc=$rawdirisdc$nightpath"/"$filename
    3344   ingestlinkpath="/scratch/ingest_links/raw/"$nightpath
    3445   makedir $ingestlinkpath >> $logfile 2>&1
    35    ingestlink=$ingestlinkpath"/"$night"_"`printf %03d $runid`".fits.gz"
     46   ingestlink=$ingestlinkpath"/"$filename
     47
     48   if ! ssh fact@161.72.93.131 "ls $rawfilelp >/dev/null 2>&1"
     49   then
     50      #echo $rawfilelp" not yet available on data."
     51      printprocesslog "INFO "$rawfilelp" not yet available on data."
     52      check="no"
     53      setstatus "stop"
     54      continue
     55   fi
    3656
    3757   # for new rsync
     
    7494   if [ $numdrs -gt 0 ]
    7595   then
    76       drsfilelp="/loc_data/zipraw/./"$nightpath"/"$night"_"`printf %03d $runid`".drs.fits.gz"
    77       drsfileisdc=$rawdirisdc$nightpath"/"$night"_"`printf %03d $runid`".drs.fits.gz"
    78       drsingestlink=$ingestlinkpath"/"$night"_"`printf %03d $runid`".drs.fits.gz"
     96      drsfilelp="/loc_data/zipraw/./"$nightpath"/"$nightrun".drs.fits.gz"
     97      drsfileisdc=$rawdirisdc$nightpath"/"$nightrun".drs.fits.gz"
     98      drsingestlink=$ingestlinkpath"/"$nightrun".drs.fits.gz"
     99
     100      if ! ssh fact@161.72.93.131 "ls $drsfilelp >/dev/null 2>&1"
     101      then
     102         #echo $drsfilelp" not yet available on data."
     103         printprocesslog "INFO "$drsfilelp" not yet available on data."
     104         check="no"
     105         setstatus "stop"
     106         continue
     107      fi
     108
     109
    79110      printprocesslog "INFO rsync drsfile "$drsfilelp" to ISDC "$rawdirisdc
    80111      echo "INFO rsync drsfile "$drsfilelp" to ISDC "$rawdirisdc >> $logfile 2>&1
Note: See TracChangeset for help on using the changeset viewer.