Changeset 15063
- Timestamp:
- Sep 27, 2007, 4:29:43 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/ippTasks/summit.copy.pro (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTasks/summit.copy.pro
r14681 r15063 2 2 3 3 #$uri = http://otis/ds/skyprobe/ 4 $uri = http://otis4.ifa.hawaii.edu/ds/allskycam/ 5 $camera = allskycam 6 $telescope = zl 7 $workdir = /home/moanui/jhoblitt/workdir 4 #$uri = http://otis4.ifa.hawaii.edu/ds/allskycam/ 5 #$camera = allskycam 6 #$telescope = zl 7 #$workdir = /data/ipp004.0/allskycam 8 $uri = http://conductor/ds/gpc1/index.txt 9 $camera = gpc1 10 $telescope = ps1 11 $workdir = /data/ipp006.0/gpc1 12 13 $VERBOSE = 1 8 14 9 15 if ($?network == 0) … … 25 31 26 32 # timeout shorter than exec so jobs do not build up 27 periods -exec 3028 periods -poll 1 029 periods -timeout 3033 periods -exec 15 34 periods -poll 1 35 periods -timeout 15 30 36 31 37 task.exit 0 … … 42 48 # build a book of exps/filesetids that need to be queried 43 49 task pztool.pendingexp 44 command pztool -pendingexp 50 command pztool -pendingexp -limit 25 45 51 host local 46 52 47 53 # timeout shorter than exec so jobs do not build up 48 periods -exec 3049 periods -poll 1 050 periods -timeout 3054 periods -exec 15 55 periods -poll 1 56 periods -timeout 15 51 57 52 58 # success … … 73 79 task pzgetimfile 74 80 periods -exec 1 75 periods -poll 581 periods -poll 1 76 82 periods -timeout 15 83 host local 84 npending 5 77 85 78 86 task.exec … … 105 113 options $pageName 106 114 107 $run = pzgetimfiles -uri $URI -filesetid $EXP_NAME -inst $CAMERA -telescope $TELESCOPE 115 $batman = $EXP_NAME 116 $run = pzgetimfiles -uri $URI -filesetid $batman -inst $CAMERA -telescope $TELESCOPE 108 117 109 118 # create the command line … … 121 130 task.exit default 122 131 showcommand failure 123 book setword pzPendingExp $options:0 pantaskState$JOB_STATUS132 process_exit pzPendingExp $options:0 $JOB_STATUS 124 133 end 125 134 … … 133 142 # build a book of imfiles/files that need to be downloaded 134 143 task pztool.pendingimfile 135 command pztool -pendingimfile 144 command pztool -pendingimfile -limit 25 136 145 host local 137 146 138 147 # timeout shorter than exec so jobs do not build up 139 periods -exec 30140 periods -poll 1 0141 periods -timeout 30148 periods -exec 5 149 periods -poll 1 150 periods -timeout 15 142 151 143 152 # success 144 153 task.exit 0 145 154 # convert 'stdout' to book format 146 # ipptool2book stdout pzPendingImfile -key exp_name:camera:telescope -uniq -setword dbname $options:0 -setword pantaskState INIT 147 ipptool2book stdout pzPendingImfile -key exp_name:camera:telescope -uniq -setword pantaskState INIT 155 # ipptool2book stdout pzPendingImfile -key exp_name:class_id:camera:telescope -uniq -setword dbname $options:0 -setword pantaskState INIT 156 157 # echo "pendingimfile " 158 # queuesize stdout 159 160 ipptool2book stdout pzPendingImfile -key exp_name:class_id:camera:telescope -uniq -setword pantaskState INIT 161 162 # echo "pzPendingImfile N " 163 # book npages pzPendingImfile 148 164 149 165 # delete existing entries in the appropriate pantaskStates … … 163 179 task dsget 164 180 periods -exec 5 165 periods -poll 5181 periods -poll 1 166 182 periods -timeout 30 183 host anyhost 167 184 168 185 task.exec … … 189 206 book getword pzPendingImfile $pageName bytes -var BYTES 190 207 book getword pzPendingImfile $pageName md5sum -var MD5SUM 208 book getword pzPendingImfile $pageName dateobs -var DATEOBS 209 210 # figure out filename 211 $FILENAME = $workdir/$EXP_NAME.$CLASS_ID.fits 212 213 book setword pzPendingImfile $pageName filename FILENAME 191 214 192 215 # store the pageName with this job 193 216 options $pageName 194 217 195 $run = dsget --uri $URI --filename $workdir/$EXP_NAME.$CLASS_ID.fits --bytes $BYTES --md5 $MD5SUM 218 if ($MD5SUM == 0) 219 $run = dsget --uri $URI --filename $FILENAME --bytes $BYTES 220 else 221 $run = dsget --uri $URI --filename $FILENAME --bytes $BYTES --md5 $MD5SUM 222 end 196 223 197 224 # create the command line … … 205 232 task.exit 0 206 233 # get related info from the associated page 207 book getword pzPendingImfile $options:0 uri -var URI208 234 book getword pzPendingImfile $options:0 exp_name -var EXP_NAME 235 book getword pzPendingImfile $options:0 class -var CLASS 236 book getword pzPendingImfile $options:0 camera -var CAMERA 237 book getword pzPendingImfile $options:0 telescope -var TELESCOPE 209 238 book getword pzPendingImfile $options:0 class_id -var CLASS_ID 210 book getword pzPendingImfile $options:0 bytes -var BYTES 211 book getword pzPendingImfile $options:0 md5sum -var MD5SUM 239 book getword pzPendingImfile $options:0 filename -var FILENAME 212 240 213 241 # update the database with the success 214 $run = pztool -copydone -exp_name $EXP_NAME -inst $CAMERA -telescope $TELESCOPE -class $CLASS -class_id $CLASS_ID -uri $workdir/$EXP_NAME.$CLASS_ID.fits242 $run = pztool -copydone -exp_name $EXP_NAME -inst $CAMERA -telescope $TELESCOPE -class $CLASS -class_id $CLASS_ID -uri $FILENAME 215 243 216 244 # create the command line … … 221 249 222 250 # update the pantasks process tables 223 process_exit pzPending Exp$options:0 $JOB_STATUS251 process_exit pzPendingImfile $options:0 $JOB_STATUS 224 252 end 225 253 226 254 task.exit default 227 255 showcommand failure 228 book setword pzPendingImfile $options:0 pantaskState$JOB_STATUS256 process_exit pzPendingImfile $options:0 $JOB_STATUS 229 257 end 230 258
Note:
See TracChangeset
for help on using the changeset viewer.
