Changeset 14621
- Timestamp:
- Aug 22, 2007, 3:52:53 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/ippTasks/summit.copy.pro (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTasks/summit.copy.pro
r14607 r14621 7 7 $workdir = /home/moanui/jhoblitt/workdir 8 8 9 if ($?network == 0) 10 $network = 1 11 end 9 12 if ($?parallel == 0) 10 13 $parallel = 0 11 end12 13 if ($?network == 0)14 $network = 115 14 end 16 15 … … 20 19 book init pzPendingImfile 21 20 22 # run pzgetexp periodically to populate pzPendingExp 21 # run pzgetexp periodically to populate pzPendingExp in the database (no I/O) 23 22 task pzgetexp 24 23 command pzgetexp -uri $uri -inst $camera -telescope $telescope … … 43 42 # build a book of exps/filesetids that need to be queried 44 43 task pztool.pendingexp 45 command pztool -pendingexp -simple44 command pztool -pendingexp 46 45 host local 47 46 … … 54 53 task.exit 0 55 54 # convert 'stdout' to book format 56 # ipptool2book stdout pzPendingExp -key exp_name:camera:telescope -uniq -setword dbname $options:0 -setword pantaskState INIT 55 # ipptool2book stdout pzPendingExp -key exp_name:camera:telescope -uniq -setword dbname $options:0 -setword pantaskState INIT 56 57 # XXX we probably want the database to be user-defined... 57 58 ipptool2book stdout pzPendingExp -key exp_name:camera:telescope -uniq -setword pantaskState INIT 58 59 … … 78 79 if ($network == 0) break 79 80 81 # if we are waiting on data, make the interval long 80 82 book npages pzPendingExp -var N 81 83 if ($N == 0) 82 periods -exec2084 periods -exec 20 83 85 break 84 86 end 85 periods -exec0.287 periods -exec 0.2 86 88 87 89 # find an exp that needs imfiles fetched … … 89 91 if ($pageName == NULL) break 90 92 91 92 93 # set that exp to run 93 94 book setword pzPendingExp $pageName pantaskState RUN 94 95 95 book getword pzPendingExp $pageName exp_ id -var EXP_ID96 book getword pzPendingExp $pageName exp_name -var EXP_NAME 96 97 book getword pzPendingExp $pageName camera -var CAMERA 97 98 book getword pzPendingExp $pageName telescope -var TELESCOPE … … 104 105 options $pageName 105 106 106 $run = pzgetimfiles -uri $URI -filesetid $EXP_ ID-inst $CAMERA -telescope $TELESCOPE107 $run = pzgetimfiles -uri $URI -filesetid $EXP_NAME -inst $CAMERA -telescope $TELESCOPE 107 108 108 109 # create the command line … … 132 133 # build a book of imfiles/files that need to be downloaded 133 134 task pztool.pendingimfile 134 command pztool -pendingimfile -simple135 command pztool -pendingimfile 135 136 host local 136 137 … … 143 144 task.exit 0 144 145 # convert 'stdout' to book format 145 # ipptool2book stdout pzPendingImfile -key exp_name:camera:telescope -uniq -setword dbname $options:0 -setword pantaskState INIT146 # ipptool2book stdout pzPendingImfile -key exp_name:camera:telescope -uniq -setword dbname $options:0 -setword pantaskState INIT 146 147 ipptool2book stdout pzPendingImfile -key exp_name:camera:telescope -uniq -setword pantaskState INIT 147 148 … … 168 169 if ($network == 0) break 169 170 171 # if we are waiting on data, make the interval long 170 172 book npages pzPendingImfile -var N 171 173 if ($N == 0) 172 periods -exec20174 periods -exec 20 173 175 break 174 176 end 175 periods -exec0.2177 periods -exec 0.2 176 178 177 179 # find an exp that needs imfiles fetched 178 180 book getpage pzPendingImfile 0 -var pageName -key pantaskState INIT 179 181 if ($pageName == NULL) break 180 181 182 182 183 # set that exp to run … … 189 190 book getword pzPendingImfile $pageName md5sum -var MD5SUM 190 191 191 # store the current page192 # store the pageName with this job 192 193 options $pageName 193 194 … … 203 204 # success 204 205 task.exit 0 205 book getword options $pageName uri -var URI206 book getword options $pageName exp_name -var EXP_NAME207 book getword options $pageName class_id -var CLASS_ID208 book getword options $pageName bytes -var BYTES209 book getword options $pageName md5sum -var MD5SUM210 211 book delpage pzPendingImfiles optoins 212 213 local$run = pztool -copydone -exp_name $EXP_NAME -inst $CAMERA -telescope $TELESCOPE -class $CLASS -class_id $CLASS_ID -uri $workdir/$EXP_NAME.$CLASS_ID.fits206 # get related info from the associated page 207 book getword pzPendingImfile $options:0 uri -var URI 208 book getword pzPendingImfile $options:0 exp_name -var EXP_NAME 209 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 212 213 # 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.fits 214 215 215 216 # create the command line 216 217 if ($VERBOSE > 1) 217 echo command $run 218 end 219 command $run 220 218 echo exec $run 219 end 220 exec $run 221 222 # update the pantasks process tables 221 223 process_exit pzPendingExp $options:0 $JOB_STATUS 222 224 end
Note:
See TracChangeset
for help on using the changeset viewer.
