Changeset 16307
- Timestamp:
- Feb 4, 2008, 6:59:47 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/ippTasks/summit.copy.pro (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTasks/summit.copy.pro
r16298 r16307 1 1 ## summit.copy.pro : tasks for the summit to IPP download : -*- sh -*- 2 2 ## PanTasks scripts for Summit Copy 3 4 ## XXX note that this currently works with a single database as defined in .ipprc 3 5 4 6 # pztool -adddatastore -inst isp -telescope ps1 -uri http://otis1.ifa.hawaii.edu/ds/skyprobe/index.txt … … 18 20 check.globals 19 21 20 # the templates are used if we have a class_id/host relationship; if none is found, the default values are used21 # XXX not sure how to handle the .N value if we need to use more than one22 # XXX this stuff should all be placed in a 'site' config file23 if ($NEBULOUS)24 $default_host = ipp00425 $workdir_template = neb:///@HOST@.026 else27 $default_host = ipp00428 $workdir_template = /data/@HOST@.0/29 end30 31 22 # list of DataStores to pull data from 32 23 book init pzDataStore … … 35 26 # list of summit imfiles that need to be downloaded 36 27 book init pzPendingImfile 28 29 macro 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 48 end 49 50 macro 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 69 end 37 70 38 71 # build a book of datastores to poll for data … … 116 149 # build a book of exps/filesetids that need to be queried 117 150 task pztool.pendingexp 118 command pztool -pendingexp -limit 25151 command pztool -pendingexp -limit 5 119 152 host local 120 153 … … 127 160 task.exit 0 128 161 # convert 'stdout' to book format 162 # XXX we probably want the database to be user-defined... 129 163 # 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...132 164 ipptool2book stdout pzPendingExp -key exp_name:camera:telescope -uniq -setword pantaskState INIT 133 165 … … 210 242 # build a book of imfiles/files that need to be downloaded 211 243 task pztool.pendingimfile 212 command pztool -pendingimfile -limit 120244 command pztool -pendingimfile -limit 5 213 245 host local 214 246 … … 222 254 # convert 'stdout' to book format 223 255 # ipptool2book stdout pzPendingImfile -key exp_name:camera:telescope:class:class_id -uniq -setword dbname $options:0 -setword pantaskState INIT 224 225 256 ipptool2book stdout pzPendingImfile -key exp_name:camera:telescope:class:class_id -uniq -setword pantaskState INIT 226 257 … … 271 302 272 303 set.host.for.camera $CAMERA $CLASS_ID 273 host anyhost274 304 275 305 # 2007-08-30T05:09:59Z … … 282 312 # it sets workdir and volume 283 313 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 volume285 314 286 315 # figure out filename 287 316 # 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 290 320 # workdir examples: 291 321 # 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 293 327 294 328 book setword pzPendingImfile $pageName filename $FILENAME 295 329 296 330 # store the pageName with this job 297 options $pageName 298 options $workdir 331 options $pageName $workdir 299 332 300 333 $run = dsget --uri $URI --filename $FILENAME --bytes $BYTES 301 if ( $MD5SUM)334 if (("$MD5SUM" != "NULL") && ("$MD5SUM" != "0")) 302 335 $run = $run --md5 $MD5SUM 303 336 end 304 if ($NEBULOUS && ("$volname" != "NULL"))305 $run = $run -- volume $volume337 if ($NEBULOUS) 338 $run = $run --nebulous 306 339 end 307 340 … … 310 343 echo command $run 311 344 end 345 312 346 command $run 313 347 end
Note:
See TracChangeset
for help on using the changeset viewer.
