IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 16307


Ignore:
Timestamp:
Feb 4, 2008, 6:59:47 PM (18 years ago)
Author:
eugene
Message:

various fixes for nebulous

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTasks/summit.copy.pro

    r16298 r16307  
    11## summit.copy.pro : tasks for the summit to IPP download : -*- sh -*-
    22## PanTasks scripts for Summit Copy
     3
     4## XXX note that this currently works with a single database as defined in .ipprc
    35
    46# pztool -adddatastore -inst isp -telescope ps1 -uri http://otis1.ifa.hawaii.edu/ds/skyprobe/index.txt
     
    1820check.globals
    1921
    20 # the templates are used if we have a class_id/host relationship; if none is found, the default values are used
    21 # XXX not sure how to handle the .N value if we need to use more than one
    22 # XXX this stuff should all be placed in a 'site' config file
    23 if ($NEBULOUS)
    24  $default_host     = ipp004
    25  $workdir_template = neb:///@HOST@.0
    26 else
    27  $default_host     = ipp004
    28  $workdir_template = /data/@HOST@.0/
    29 end
    30 
    3122# list of DataStores to pull data from
    3223book init pzDataStore
     
    3526# list of summit imfiles that need to be downloaded
    3627book init pzPendingImfile
     28
     29macro copy.on
     30  task pztool.datastore
     31    active true
     32  end
     33  task pzgetexp
     34    active true
     35  end
     36  task pztool.pendingexp
     37    active true
     38  end
     39  task pzgetimfile
     40    active true
     41  end
     42  task pztool.pendingimfile
     43    active true
     44  end
     45  task dsget
     46    active true
     47  end
     48end
     49
     50macro copy.off
     51  task pztool.datastore
     52    active false
     53  end
     54  task pzgetexp
     55    active false
     56  end
     57  task pztool.pendingexp
     58    active false
     59  end
     60  task pzgetimfile
     61    active false
     62  end
     63  task pztool.pendingimfile
     64    active false
     65  end
     66  task dsget
     67    active false
     68  end
     69end
    3770
    3871# build a book of datastores to poll for data
     
    116149# build a book of exps/filesetids that need to be queried
    117150task pztool.pendingexp
    118     command      pztool -pendingexp -limit 25
     151    command      pztool -pendingexp -limit 5
    119152    host         local
    120153
     
    127160    task.exit 0
    128161        # convert 'stdout' to book format
     162# XXX we probably want the database to be user-defined...
    129163#       ipptool2book stdout pzPendingExp -key exp_name:camera:telescope -uniq -setword dbname $options:0 -setword pantaskState INIT
    130 
    131 # XXX we probably want the database to be user-defined...
    132164        ipptool2book stdout pzPendingExp -key exp_name:camera:telescope -uniq -setword pantaskState INIT
    133165
     
    210242# build a book of imfiles/files that need to be downloaded
    211243task pztool.pendingimfile
    212     command      pztool -pendingimfile -limit 120
     244    command      pztool -pendingimfile -limit 5
    213245    host         local
    214246
     
    222254        # convert 'stdout' to book format
    223255#       ipptool2book stdout pzPendingImfile -key exp_name:camera:telescope:class:class_id -uniq -setword dbname $options:0 -setword pantaskState INIT
    224 
    225256        ipptool2book stdout pzPendingImfile -key exp_name:camera:telescope:class:class_id -uniq -setword pantaskState INIT
    226257
     
    271302
    272303        set.host.for.camera $CAMERA $CLASS_ID
    273         host        anyhost
    274304
    275305        # 2007-08-30T05:09:59Z
     
    282312        # it sets workdir and volume
    283313        set.workdir.by.camera $CAMERA $CLASS_ID $workdir_template $default_host workdir_base
    284         set.volume.by.camera $CAMERA $CLASS_ID $volume_template $default_volume volume
    285314
    286315        # figure out filename
    287316        # XXX may need to use sprintf here
    288         $FILENAME = $workdir_base/$CAMERA/$YEAR$MONTH$DAY/$EXP_NAME/$EXP_NAME.$CLASS_ID.fits
    289         $workdir = $workdir_template/$CAMERA/$YEAR$MONTH$DAY
     317        $FILENAME = $workdir_base/$CAMERA/$YEAR\$MONTH\$DAY/$EXP_NAME/$EXP_NAME.$CLASS_ID.fits
     318        $workdir = $workdir_template/$CAMERA/$YEAR\$MONTH\$DAY
     319
    290320        # workdir examples:
    291321        # file://data/@HOST@.0/gpc1/20080130
    292         # neb://gpc1/20080130 (need to supply volname?, or are we re-defining this each time?)
     322        # neb://@HOST@.0/gpc1/20080130
     323
     324        # filename examples:
     325        # file://data/ipp005.0/gpc1/20080130/o4437g0025d/o4437g0025d.XY05.fits
     326        # neb://@HOST@.0/gpc1/20080130/o4437g0025d/o4437g0025d.XY05.fits
    293327
    294328        book setword pzPendingImfile $pageName filename $FILENAME
    295329
    296330        # store the pageName with this job
    297         options $pageName
    298         options $workdir
     331        options $pageName $workdir
    299332
    300333        $run = dsget --uri $URI --filename $FILENAME --bytes $BYTES
    301         if ($MD5SUM)
     334        if (("$MD5SUM" != "NULL") && ("$MD5SUM" != "0"))
    302335            $run = $run --md5 $MD5SUM
    303336        end
    304         if ($NEBULOUS && ("$volname" != "NULL"))
    305             $run = $run --volume $volume
     337        if ($NEBULOUS)
     338            $run = $run --nebulous
    306339        end
    307340
     
    310343          echo command $run
    311344        end
     345
    312346        command $run
    313347    end
Note: See TracChangeset for help on using the changeset viewer.